Skip to content

Commit eb3a110

Browse files
sdks/python: remove SQL_TABLE_ID env variable
1 parent 3b26472 commit eb3a110

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def enrichment_with_cloudsql():
6464
database_user = os.environ.get("SQL_DB_USER")
6565
database_password = os.environ.get("SQL_DB_PASSWORD")
6666
database_id = os.environ.get("SQL_DB_ID")
67-
table_id = os.environ.get("SQL_TABLE_ID")
67+
table_id = "products"
6868
where_clause_template = "product_id = {}"
6969
where_clause_fields = ["product_id"]
7070

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def test_enrichment_with_vertex_ai_legacy(self, mock_stdout):
114114
self.assertEqual(output, expected)
115115

116116
def pre_cloudsql_enrichment_test(self):
117+
table_id ="products"
117118
columns = [
118119
Column("product_id", Integer, primary_key=True),
119120
Column("name", String, nullable=False),
@@ -138,10 +139,9 @@ def pre_cloudsql_enrichment_test(self):
138139
os.environ['SQL_DB_PASSWORD'] = db.password
139140
os.environ['SQL_DB_ID'] = db.id
140141
os.environ['SQL_DB_URL'] = db.url
141-
os.environ['SQL_TABLE_ID'] = "products"
142142
engine = CloudSQLEnrichmentTestHelper.create_table(
143-
table_id=os.environ.get("SQL_TABLE_ID"),
144143
db_url=os.environ.get("SQL_DB_URL"),
144+
table_id=table_id,
145145
columns=columns,
146146
table_data=table_data)
147147
return db, engine
@@ -156,7 +156,6 @@ def post_cloudsql_enrichment_test(
156156
os.environ.pop('SQL_DB_PASSWORD', None)
157157
os.environ.pop('SQL_DB_ID', None)
158158
os.environ.pop('SQL_DB_URL', None)
159-
os.environ.pop('SQL_TABLE_ID', None)
160159

161160

162161
if __name__ == '__main__':

0 commit comments

Comments
 (0)