aboutsummaryrefslogtreecommitdiff
path: root/examples/importer.toml
blob: a8ee19932dbcd385cff4338c0dbea7d6e3dc8e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
dataset = "dataset.toml"

[source]
  name = "source"
  # The file is looked up in the dataset

[externals.source-target]
  intern_key = ":source.A ^ '-suffix'"
  extern_key = ":A ^ '-suffix'"
  allow_missing = false
  # The file is looked up in the dataset

[externals.a_financial]
  intern_key = ":source-target.A"
  extern_key = ":O"
  file = "financial.xlsx"
  allow_missing = false

[sheet]
  columns = [
    ":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])",
    "1 = counter([:C], [:A])", 
    ":E", 
    "match('(..)', :B)",
    ":D",
    "counter([:D], [:A])",
    "year(:N)",
    # Apply a function on the year
    """:Q 
        - 
        # We only keep the years after Y2K
        2000"""

  ]
  filters = [

    "1 = counter( [:B], [:A])",

  ]
  sort = []