Passing dates as variables in SQL Query Source

I’m extracting a date from one SQL table in SQL query source object and trying to pass it as variable in another SQL query source object using the ‘where’ clause. However, this approach ends up in parametrization error. How can I process this kind of data in Astera Centerprise?

This approach is not possible in a single dataflow since Astera Centerprise changes the date formats while processing dates and SQL input requires a specific format of ‘yyyy-mm-dd’ to process the query.

What you can do is first move the SQL Query Source that gives date as output to a workflow and process this in an expression to convert this date in the format described above. Then, you can pass the converted string value though a variable in RunDataflow object and use that variable as input in the SQL Query Source in your where clause.

Please look at the attached screenshot for reference. It also shows the formula that you can use inside the Expression box to convert date into that specific format.

image