Skip to content

Commit

Permalink
fix: intraday flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanBergenov committed Nov 9, 2024
1 parent baccd16 commit e24b8d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, gcp_project, dataset, table_type, date_shard):

if self.table_type == "pseudonymous_users" or self.table_type=="users":
self.date_field_name = "`date`"
elif self.table_type == "events":
elif self.table_type == "events" or self.table_type == "events_intraday":
self.date_field_name = "event_date"

def source_table_is_intraday(self):
Expand Down Expand Up @@ -128,7 +128,7 @@ def get_temp_table_query(self):

qry = ""

if self.table_type == "events":
if self.table_type in ("events", "events_intraday" ):

qry = f"""
CREATE OR REPLACE TEMP TABLE temp_events AS (
Expand Down Expand Up @@ -664,7 +664,7 @@ def build_full_query(self, sharded_output_required=True, partitioned_output_requ
assert len(list_of_flat_tables) >= 1, "At least 1 flat table needs to be included in the config file"
query = ""

if self.table_type in ("events", "users"):
if self.table_type in ("events", "events_intraday", "users"):

query += self.get_temp_table_query()

Expand Down

0 comments on commit e24b8d2

Please sign in to comment.