I'm encountering difficulties figuring out how to overwrite execution variables in releases using Google Dataform. I have a repository set up with three main components contributing to this issue: a model_config.js file where I include a function to calculate the date 60 days ago in JavaScript, a dataform.json file where I should declare the variables, and a reference to the code in a WHERE clause when materializing a table.
I need the default value of my variable, let's call it "parametrized_start_date," to be current_date - 60 days. To achieve this, I created the calculation in the model_config file as follows: enter image description here and added the variable to the module.exports and then called it in the where of my table materialization as such:
where load_date >= PARSE_DATE(CAST(${model_config.parametrized_start_date_js} AS STRING), '%Y%m%d')
What I need now is to find a way to override the variable i've created in a release, but that only seems to work overriding the variables in the dataform.json file, and i cant reference the model_config file there to at least create a var in the json file invoking what i've created. Does anyone knows how can I achieve this?
I've tried creating the variable in the json file, but failed, as well as trying to create a new variable calling the one in the model config