Skip to content

Commit

Permalink
Update component.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chmstimoteo authored Dec 13, 2024
1 parent 0631f34 commit d7ee88a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pipelines/components/bigquery/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ def bq_dynamic_query_exec_output(
# Construct query template
template = jinja2.Template("""
CREATE OR REPLACE TABLE `{{project_id}}.{{dataset}}.{{create_table}}` AS (
SELECT
SELECT DISTINCT
feature,
ROUND(100 * SUM(users) OVER (ORDER BY users DESC) / SUM(users) OVER (), 2) as cumulative_traffic_percent,
Expand All @@ -892,7 +892,7 @@ def bq_dynamic_query_exec_output(
SELECT
user_pseudo_id,
user_id,
page_location as page_path
LOWER(page_location) as page_path
FROM `{{mds_project_id}}.{{mds_dataset}}.event`
WHERE
event_name = 'page_view'
Expand Down Expand Up @@ -1423,4 +1423,4 @@ def execute_query_with_retries(query):
logging.error(f"Query failed after retries: {e}")




0 comments on commit d7ee88a

Please sign in to comment.