https://slingdata.io logo
Hi, i am trying to create an incremental
# sling-help
i
Hi, i am trying to create an incremental that brings data until the start date of the sling job . Because our process brings many tables and it takes several minutes We don't want the fact tables to bring data that was written after the beginning of the job. how can we get sling_loaded_at ? If we use pipeline it will be the same value for all replicas? sql: | SELECT * FROM {stream_table} WHERE updated_at > COALESCE({incremental_value}, '1900-01-01 00:00:00') - INTERVAL 2 HOUR and updated_at < '{env._sling_loaded_at}' Tried it in several ways : put the env at the bottom of the file , '{{env._sling_loaded_at}}', and a hook. hooks: start: - type: store key: env._sling_loaded_at value: "{timestamp.YYYY}-{timestamp.MM}-{timestamp.DD} {timestamp.HH}:{timestamp.mm}:{timestamp.ss}"
f
Hi, this is fixed for next version, you'll be able to do
updated_at < '{execution.start_time}'
i
great thanks 🙂
Hi, i am on 1.5.20 , i tried this sql: | SELECT {fields}, '{execution.start_time}' as etl_time FROM {stream_table} to see the column and it doesnt work yet. unless i am missing something.
f
latest version is v1.5.21