Skip to main content
I would like to create a dynamic date filter in Data Extraction jobs so that every time my extractions will contain the last 24 months of data. For example, on March 15, 2024, I would like to have my start date set up as March 1, 2022, for the BUDAT field

Hi,

 

you can use a dummy table that is being created in front of your extraction that only contains the dynamic start date in it. e.g:

 

DROP TABLE IF EXISTS TMP_DYN_START_DATE;

 

CREATE TABLE TMP_DYN_START_DATE AS (

    SELECT TIMESTAMPADD (YY, -2, (ROUND(CURRENT_DATE, 'MM')))

);

 

Use the TMP table within your dynamic Data Pool Parameter and use this parameter within your Data Extractions as date filter.

 

BR

Dennis


Use the dynamic parameters. Take the "ROLLING_START_DATE" from your required table and set it as a data pool parameter. In a separate transformation, make the ROLLING_START_DATE to be <= ADD_MONTHS(__, 18).

imageIn a transformation of the you can create the table Extraction_Start referenced in the parameter. imageimage 


Use the dynamic parameters. Take the "ROLLING_START_DATE" from your required table and set it as a data pool parameter. In a separate transformation, make the ROLLING_START_DATE to be <= ADD_MONTHS(__, 18).

imageIn a transformation of the you can create the table Extraction_Start referenced in the parameter. imageimage 

That is exactly what I recommended... :)


Thanks a lot !


Reply