Skip to content

Commit

Permalink
switch to zetasql
Browse files Browse the repository at this point in the history
  • Loading branch information
ohnorobo committed Jul 12, 2023
1 parent 03227a6 commit 812fea4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pipeline/beam_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,6 @@ def _get_pipeline_options(self, scan_type: str,
],
dataflow_service_options=['enable_prime'],
setup_file='./pipeline/setup.py')
pipeline_options.set_planner_name('org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner')

from pprint import pprint
pprint("printing pipeline options")
pprint(pipeline_options)

pipeline_options.view_as(SetupOptions).save_main_session = True
return pipeline_options

Expand All @@ -596,7 +590,9 @@ def derive_dashboard_rows(self, rows: beam.PCollection[schema.HyperquackRow]) ->
pprint(dir(coder_rows))
pprint(coder_rows.element_type)

dash_rows = (coder_rows | 'derive dashboard rows' >> SqlTransform(sql_query) )
dash_rows = (coder_rows | 'derive dashboard rows' >> SqlTransform(
sql_query,
dialect='org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner') )
#.with_output_types(BigqueryOutputRow))

pprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
Expand Down

0 comments on commit 812fea4

Please sign in to comment.