surpriseturtle's avatar
surpriseturtle
Frequent Visitor
9 months ago
Status:
Abandoned

Dataflows should verify using actual library variables

I have several dataflows that use library variables so they can be deployed through the dev-test-prod deployment pipeline and refer to different workspaces & lakehouses within those different stages. These variables are accessed through the Variable.ValueOrDefault method, with the default value referring to the development environment. After the source data is accessed, I wrote a custom line to test if the table has 0 rows of data and it throws an error if true (to prevent the dataflow from overwriting the destination with 0 rows). 

 

I ran the dataflow in the test environment at a time when the development environment had 0 rows of data in the source table, but the test environment should have been pulling from the test environment lakehouse so I didn't expect an error. The validation step of the dataflow failed, and only succeeded when I changed the Default values to the test environment IDs or after I loaded new data into the development environment lakehouse table. 

 

It seems to me that the validation step is not fully running the Variable.ValueOrDefault method to get the current environment and is just taking the default values, so the validation is going to fail any time there is an error based on the development environment. It makes more sense to me for the validation step to use the library variables in the current environment so this doesn't cause issues with pipelines in the test & production environments when the development environment is going through changes. 

3 Comments

Recent ideas