You can use step parameters to define params at the step level (that will complement those defined at the workflow level) and reference them within your data source query.
Please refer to the parameters docs for an overview of params within hibase Workflows.
Params defined here will be calculated at the time the step is started and made available to the step's data source. They will not be available to subsequent steps.
These are common use cases for step parameters:
This can be achieved by generating params from an SQL Query, executed against the target table of the step itself. For example, if you want to only transfer newly created users from your production database to your Data Warehouse, you might run a params query along the lines of:
1 2 3 4SELECT max(created_at) AS last_created, max(updated_at) AS last_updated FROM dwh.users
And reference those last_created and last_updated params you just defined in your data source query:
1 2 3 4SELECT * FROM production.users {{ WHERE created_at > $last_created }} {{ OR updated_at > $last_updated }}
If you are confused by those {{ ... }} statements in the SQL query, check out the parameters docs to see how you can augment your SQL queries in hibase.
For example, you might add a timestamp column to a Connector Query data source to track when the data was extracted. To achieve, this, you might use JSON parameters at the step or workflow level, according to when you want the timestamp to be calculated:
1 2 3{ "extracted_at": "{{ $now }}" }
You can then reference the extracted_at param within your data source. In the example at hand, you might want to Add a custom field to your Connector Query, label it at will and set its value to {{ $extracted_at }}.