From 73d0659b051079300b011d95594738f1b7a289ee Mon Sep 17 00:00:00 2001 From: Carlos Timoteo Date: Fri, 15 Nov 2024 17:54:51 -0500 Subject: [PATCH] Rebase Multi property with main (#247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update README.md * ensure the build bucket is created in the specified region (#230) * Update audience_segmentation_query_template.sqlx * Update auto_audience_segmentation_query_template.sqlx * Update churn_propensity_query_template.sqlx * Update cltv_query_template.sqlx * Update purchase_propensity_query_template.sqlx * Restrict regions for GCP Cloud Build support (#241) * Update README.md * Move to uv (#242) * add uv required project table segment in toml file * switch to uv in terraform deployment * switch to uv * remove poetry usage from terraform * format * remove poetry * Add files via upload * Support property id in resources (#246) * predicting for only the users with traffic in the past 72h - purchase propensity * running inference only for users events in the past 72h * including 72h users for all models predictions * considering null values in TabWorkflow models * deleting unused pipfile * upgrading lib versions * implementing reporting preprocessing as a new pipeline * adding more code documentation * adding important information on the main README.md and DEVELOPMENT.md * adding schedule run name and more code documentation * implementing a new scheduler using the vertex ai sdk & adding user_id to procedures for consistency * adding more code documentation * adding code doc to the python custom component * adding more code documentation * fixing aggregated predictions query * removing unnecessary resources from deployment * Writing MDS guide * adding the MDS developer and troubleshooting documentation * fixing deployment for activation pipelines and gemini dataset * Update README.md * Update README.md * Update README.md * Update README.md * removing deprecated api * fixing purchase propensity pipelines names * adding extra condition for when there is not enough data for the window interval to be applied on backfill procedures * adding more instructions for post deployment and fixing issues when GA4 export was configured for less than 10 days * removing unnecessary comments * adding the number of past days to process in the variables files * adding comment about combining data from different ga4 export datasets to data store * fixing small issues with feature engineering and ml pipelines * fixing hyper parameter tuning for kmeans modeling * fixing optuna parameters * adding cloud shell image * fixing the list of all possible users in the propensity training preparation tables * additional guardrails for when there is not enough data * adding more documentation * adding more doc to feature store * add feature store documentation * adding ml pipelines docs * adding ml pipelines docs * adding more documentation * adding user agent client info * fixing scope of client info * fix * removing client_info from vertex components * fixing versioning of tf submodules * reconfiguring meta providers * fixing issue 187 * chore(deps): upgrade terraform providers and modules version * chore(deps): set the provider version * chore: formatting * fix: brand naming * fix: typo * fixing secrets issue * implementing secrets region as tf variable * implementing secrets region as tf variable * last changes requested by lgrangeau * documenting keys location better * implementing vpc peering network * Update README.md * Rebase Main into Multi-property (#243) * Update README.md * ensure the build bucket is created in the specified region (#230) * Update audience_segmentation_query_template.sqlx * Update auto_audience_segmentation_query_template.sqlx * Update churn_propensity_query_template.sqlx * Update cltv_query_template.sqlx * Update purchase_propensity_query_template.sqlx * Restrict regions for GCP Cloud Build support (#241) * Update README.md * Move to uv (#242) * add uv required project table segment in toml file * switch to uv in terraform deployment * switch to uv * remove poetry usage from terraform * format * remove poetry * Add files via upload --------- Co-authored-by: Charlie Wang <2144018+kingman@users.noreply.github.com> Co-authored-by: Mårten Lindblad * supporting property id in the resources --------- Co-authored-by: Carlos Timoteo Co-authored-by: Laurent Grangeau Co-authored-by: Charlie Wang <2144018+kingman@users.noreply.github.com> Co-authored-by: Mårten Lindblad * Update terraform-template.tfvars * Update setup.py --------- Co-authored-by: Charlie Wang <2144018+kingman@users.noreply.github.com> Co-authored-by: Mårten Lindblad Co-authored-by: Carlos Timoteo Co-authored-by: Laurent Grangeau --- infrastructure/cloudshell/terraform-template.tfvars | 1 + python/ga4_setup/setup.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/infrastructure/cloudshell/terraform-template.tfvars b/infrastructure/cloudshell/terraform-template.tfvars index c38764da..f08e5ebc 100644 --- a/infrastructure/cloudshell/terraform-template.tfvars +++ b/infrastructure/cloudshell/terraform-template.tfvars @@ -27,6 +27,7 @@ deploy_monitoring = true data_project_id = "${MAJ_MDS_PROJECT_ID}" destination_data_location = "${MAJ_MDS_DATA_LOCATION}" +property_id = "${MAJ_GA4_PROPERTY_ID}" data_processing_project_id = "${MAJ_MDS_DATAFORM_PROJECT_ID}" source_ga4_export_project_id = "${MAJ_GA4_EXPORT_PROJECT_ID}" source_ga4_export_dataset = "${MAJ_GA4_EXPORT_DATASET}" diff --git a/python/ga4_setup/setup.py b/python/ga4_setup/setup.py index 03204812..658f1650 100644 --- a/python/ga4_setup/setup.py +++ b/python/ga4_setup/setup.py @@ -513,9 +513,14 @@ def entry(): if args.ga4_resource == "check_property_type": property = get_property(configuration) - result = { - 'supported': f"{property.property_type == property.property_type.PROPERTY_TYPE_ORDINARY}" - } + is_property_supported = set((property.property_type.PROPERTY_TYPE_ORDINARY, property.property_type.PROPERTY_TYPE_SUBPROPERTY, property.property_type.PROPERTY_TYPE_ROLLUP)) + + result = {} + if property.property_type in is_property_supported: + result = {'supported': "True"} + else: + result = {'supported': "False"} + print(json.dumps(result)) # python setup.py --ga4_resource=custom_events