Skip to content

Commit 9fd5fe1

Browse files
committed
sdks/python: use binding parameters instead of {}
1 parent ca7e09f commit 9fd5fe1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • sdks/python/apache_beam/examples/snippets/transforms/elementwise

sdks/python/apache_beam/examples/snippets/transforms/elementwise/enrichment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def enrichment_with_google_cloudsql_pg():
135135
database_password = os.environ.get("GOOGLE_CLOUD_SQL_DB_PASSWORD")
136136
database_id = os.environ.get("GOOGLE_CLOUD_SQL_DB_ID")
137137
table_id = os.environ.get("GOOGLE_CLOUD_SQL_DB_TABLE_ID")
138-
where_clause_template = "product_id = {}"
138+
where_clause_template = "product_id = :pid"
139139
where_clause_fields = ["product_id"]
140140

141141
data = [
@@ -188,7 +188,7 @@ def enrichment_with_external_pg():
188188
database_password = os.environ.get("EXTERNAL_SQL_DB_PASSWORD")
189189
database_id = os.environ.get("EXTERNAL_SQL_DB_ID")
190190
table_id = os.environ.get("EXTERNAL_SQL_DB_TABLE_ID")
191-
where_clause_template = "product_id = {}"
191+
where_clause_template = "product_id = :pid"
192192
where_clause_fields = ["product_id"]
193193

194194
data = [
@@ -241,7 +241,7 @@ def enrichment_with_external_mysql():
241241
database_password = os.environ.get("EXTERNAL_SQL_DB_PASSWORD")
242242
database_id = os.environ.get("EXTERNAL_SQL_DB_ID")
243243
table_id = os.environ.get("EXTERNAL_SQL_DB_TABLE_ID")
244-
where_clause_template = "product_id = {}"
244+
where_clause_template = "product_id = :pid"
245245
where_clause_fields = ["product_id"]
246246

247247
data = [
@@ -294,7 +294,7 @@ def enrichment_with_external_sqlserver():
294294
database_password = os.environ.get("EXTERNAL_SQL_DB_PASSWORD")
295295
database_id = os.environ.get("EXTERNAL_SQL_DB_ID")
296296
table_id = os.environ.get("EXTERNAL_SQL_DB_TABLE_ID")
297-
where_clause_template = "product_id = {}"
297+
where_clause_template = "product_id = :pid"
298298
where_clause_fields = ["product_id"]
299299

300300
data = [

0 commit comments

Comments
 (0)