https://slingdata.io logo
hey <@1463504322611515571> i usually recommend to ...
# sling-help
f
hey @stegus64 i usually recommend to use a custom SQL for those:
Copy code
yaml
source: postgres
target: snowflake

defaults:
  mode: incremental
  primary_key: id
  update_key: modified_at
  object: new_schema.{stream_schema}_{stream_table}

streams:
  public.orders:
    sql: |
      select *, coalesce(created_at, updated_at) as modified_at
      from public.orders 
      where {incremental_where_cond}
      order by modified_at asc