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}"