Skip to content

Commit

Permalink
fix: unit test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanBergenov committed Nov 1, 2023
1 parent b31b4ff commit c1ff835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cf/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ google-cloud-storage~=1.35.0
google-cloud-bigquery~=3.13.0
google-cloud-pubsub~=2.2.0
google-cloud-bigquery-storage~=2.10.1
pytz~=2022.7.1
pytz~=2022.7.1
db_dtypes~=1.1.1
6 changes: 1 addition & 5 deletions tests/test_partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def flatten_ga_data_check_number_of_rows(self, dates_list=["20211201", "20211202
)

query_string_sharded = f"""
SELECT _TABLE_SUFFIX as event_date, count(*) nrow
SELECT event_date, count(*) nrow
FROM `{self.ga_source.gcp_project}.{self.ga_source.dataset}.{table_type}_*`
WHERE _TABLE_SUFFIX BETWEEN "{dates_list[0]}" AND "{dates_list[1]}"
GROUP BY 1
Expand All @@ -275,10 +275,6 @@ def flatten_ga_data_check_number_of_rows(self, dates_list=["20211201", "20211202
)
)

dataframe_sharded['event_date'] = pd.to_datetime(dataframe_sharded['event_date'], format='%Y%m%d')

dataframe_sharded['event_date'] = dataframe_sharded['event_date'].dt.date

assert dataframe_sharded.equals(dataframe_partitioned)


Expand Down

0 comments on commit c1ff835

Please sign in to comment.