Velir / dbt-ga4

dbt Package for modeling raw data exported by Google Analytics 4. BigQuery support, only.
MIT License
289 stars 128 forks source link

Allow distinct source and target projects #294

Closed adamribaudo-velir closed 5 months ago

adamribaudo-velir commented 6 months ago

Description & motivation

This update allows users to set distinct source and target projects. This helps in scenarios where the dbt user is not able to write to the source project. The target project is pulled from the current profile (target.project).

!!Certain variables have been renamed which introduce breaking changes!!

dataset and project no longer exist as the target.dataset and target.project will be used. New variable: source_project is now required to indicate the source of the GA4 data New variable: combined_dataset is required when sourcing from multiple properties. This specifies where to copy the cloned data. The target.project will be used to clone data. property_ids variable is an array and is used to indicate which property IDs to source from. Can be used for single or multi-property instances (ex: [1111111] for 1 property or [1111111,2222222] for 2, etc)

Checklist

adamribaudo-velir commented 6 months ago

@hugocaillol

hugocaillol commented 5 months ago

@adamribaudo-velir Admirable reactivity <3

Is it supposed to merged soon ?

I finally managed to override package macros (as suggested to do for default_channel_grouping in the readme) which could have solved the issue for me (I think), but even if I could have used it to combine data in my dbt project instead of the source project, this work will probably useful for other people