aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/dataset.toml2
-rw-r--r--examples/importer.toml17
2 files changed, 11 insertions, 8 deletions
diff --git a/examples/dataset.toml b/examples/dataset.toml
new file mode 100644
index 0000000..dd72cd2
--- /dev/null
+++ b/examples/dataset.toml
@@ -0,0 +1,2 @@
+[files]
+ source = "financial.xlsx"
diff --git a/examples/importer.toml b/examples/importer.toml
index 08e9e25..a8ee199 100644
--- a/examples/importer.toml
+++ b/examples/importer.toml
@@ -1,23 +1,25 @@
+dataset = "dataset.toml"
+
[source]
- file = "financial.xlsx"
name = "source"
+ # The file is looked up in the dataset
-[externals.target]
+[externals.source-target]
intern_key = ":source.A ^ '-suffix'"
extern_key = ":A ^ '-suffix'"
- file = "financial.xlsx"
allow_missing = false
+ # The file is looked up in the dataset
[externals.a_financial]
- intern_key = ":target.A"
- extern_key = ":O" # This key is here to generate errors
+ intern_key = ":source-target.A"
+ extern_key = ":O"
file = "financial.xlsx"
allow_missing = false
[sheet]
columns = [
- ":target.A ^ '\\''", # Ensure the quote is escaped before sending to the sql engine
- "join('-', :A, :target.E, :B)",
+ ":source-target.A ^ '\\''", # Ensure the quote is escaped before sending to the sql engine
+ "join('-', :A, :source-target.E, :B)",
":C",
"counter([:C], [:A])",
"sum(:F, [:B, :C, :D], [:B])",
@@ -40,4 +42,3 @@
]
sort = []
- uniq = []