marikt94
11/05/2025, 8:33 PMflarco
11/10/2025, 2:18 PMpre hook?
assuming your using a DB for sling state. you can simply execute an UPDATE in the pre hook to change the state value.
streams:
my_stream:
hooks:
pre:
- type: query
connection: my_state_conn # same connection you use for SLING_STATE
query: |
UDPATE my_schema._sling_state set ... where source_stream = '{stream.name}'flarco
11/10/2025, 2:18 PMflarco
11/10/2025, 2:19 PMflarco
11/10/2025, 2:20 PMmarikt94
11/10/2025, 2:25 PMflarco
11/10/2025, 2:53 PM{ date_format(run.incremental_value, "%Y-%m-%d") }marikt94
11/11/2025, 10:14 AMmarikt94
11/11/2025, 10:14 AMflarco
11/17/2025, 11:08 AMcommand hook with capture=true and grab a json output from stdout. And use the json_parse function to convert to object.marikt94
11/19/2025, 7:07 PMflarco
11/19/2025, 7:21 PMmarikt94
11/19/2025, 7:54 PMflarco
11/20/2025, 2:43 AMmachine_stats() to return the memory & cpu values