https://slingdata.io logo
hello, I am trying to figure out how to
# sling-help
m
hello, I am trying to figure out how to do a database copy but only do table schema with no rows, i tried limit: 0 on the source options, but that seems to translate to 'copy all rows'
f
hey, I think your best bet is to put
where: 1=0
. This will just select nothing, but should carry the columns & data types:
Copy code
source: db1
target: db2

defaults:
  where: 1=0

streams:
  table1:
  table2:
  ...

env:
  SLING_ALLOW_EMPTY: true
make sure to add env var
SLING_ALLOW_EMPTY=true
m
cool ill try that, thanks!