slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
301 stars 16 forks source link

Why can't replication target work with {stream_schema}.{stream_table} #221

Closed alberttwong closed 3 months ago

alberttwong commented 3 months ago
atwong@Albert-CelerData ~ % cat replication.yaml
source: DUCKDB
target: STARROCKSLOCAL

# default config options which apply to all streams
defaults:
  mode: full-refresh
  object: {stream_schema}.{stream_table}

streams:
  main.*:
atwong@Albert-CelerData ~ % sling run -r ./replication.yaml
fatal:
~ Error parsing yaml content
yaml: line 6: did not find expected key
alberttwong commented 3 months ago

this works

atwong@Albert-CelerData ~ % cat replication.yaml
source: DUCKDB
target: STARROCKSLOCAL

# default config options which apply to all streams
defaults:
  mode: full-refresh
  object: main.{stream_table}

streams:
  main.*:
flarco commented 3 months ago

Yes YAML can be fickle, you need quotes: object: "{stream_schema}.{stream_table}"