Closed jrlegrand closed 2 months ago
Should also update the fda_enforcement DAG - specifically this part:
transform_staging_task = transform.override(task_id='transform-staging')(dag_id)
transform_intermediate_task = transform.override(task_id='transform-intermediate')(dag_id,'intermediate')
extract_task >> load_task >> transform_staging_task >> transform_intermediate_task
Explanation
Changed the common transform task to handle multiple levels of transformation (staging alone or staging and intermediate). I still need to figure out the best way to handle marts because we use the + character in front of the model - I believe to indicate we want dbt to run all dependent models for these(?). Either way, I left the build_marts tasks alone for now - hardcoded into the task.
Rationale
Currently, you can only transform data into staging models because we didn't account for intermediate models. This allows flexibility to do either or both.
Tests
Tested running DAGs that only had staging models and also ones that had both staging and intermediate models.