8000 Remove deprecated 'bql' parameter (#2179) · angelafunk/python-docs-samples@5c55c6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5c55c6a

Browse files
authored
Remove deprecated 'bql' parameter (GoogleCloudPlatform#2179)
* Remove deprecated migration scripts * Comment out unused imports to pass linter * Remove commented out imports * Remove deprecated migration scripts * Add readme pointing to env upgrade docs * Replace deprecated 'bql' with 'sql' in BQ DAGs * Revert copyright year to creation year, not edit
1 parent 2de81e7 commit 5c55c6a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

composer/workflows/bq_notify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
# Query recent StackOverflow questions.
100100
bq_recent_questions_query = bigquery_operator.BigQueryOperator(
101101
task_id='bq_recent_questions_query',
102-
bql="""
102+
sql="""
103103
SELECT owner_display_name, title, view_count
104104
FROM `bigquery-public-data.stackoverflow.posts_questions`
105105
WHERE creation_date < CAST('{max_date}' AS TIMESTAMP)
@@ -121,7 +121,7 @@
121121
# Perform most popular question query.
122122
bq_most_popular_query = bigquery_operator.BigQueryOperator(
123123
task_id='bq_most_popular_question_query',
124-
bql="""
124+
sql="""
125125
SELECT title, view_count
126126
FROM `{table}`
127127
ORDER BY view_count DESC

composer/workflows/connections.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040
# [START composer_connections_default]
4141
task_default = bigquery_operator.BigQueryOperator(
4242
task_id='task_default_connection',
43-
bql='SELECT 1', use_legacy_sql=False)
43+
sql='SELECT 1', use_legacy_sql=False)
4444
# [END composer_connections_default]
4545
# [START composer_connections_explicit]
4646
task_explicit = bigquery_operator.BigQueryOperator(
4747
task_id='task_explicit_connection',
48-
bql='SELECT 1', use_legacy_sql=False,
48+
sql='SELECT 1', use_legacy_sql=False,
4949
# Composer creates a 'google_cloud_default' connection by default.
5050
bigquery_conn_id='google_cloud_default')
5151
# [END composer_connections_explicit]
5252
# [START composer_connections_custom]
5353
task_custom = bigquery_operator.BigQueryOperator(
5454
task_id='task_custom_connection',
55-
bql='SELECT 1', use_legacy_sql=False,
55+
sql='SELECT 1', use_legacy_sql=False,
5656
# Set a connection ID to use a connection that you have created.
5757
bigquery_conn_id='my_gcp_connection')
5858
# [END composer_connections_custom]

0 commit comments

Comments
 (0)
0