Skip to content

Commit

Permalink
RM-95 use quoted schema and table
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantimjohn committed Nov 6, 2023
1 parent d528fea commit 4404d75
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/integration/records/records_database_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ def tear_down(self):

@bigquery_retry()
def bring_up(self):
quoted_schema_and_table = self.quote_schema_and_table(self.schema_name,
self.table_name)
if self.engine.name == 'redshift':
create_tables = f"""
CREATE TABLE {self.schema_name}.{self.table_name} AS
CREATE TABLE {quoted_schema_and_table} AS
SELECT 123 AS num,
'123' AS numstr,
'foo' AS str,
Expand All @@ -49,7 +51,7 @@ def bring_up(self):
""" # noqa
elif self.engine.name == 'vertica':
create_tables = f"""
CREATE TABLE {self.schema_name}.{self.table_name} AS
CREATE TABLE {quoted_schema_and_table} AS
SELECT 123 AS num,
'123' AS numstr,
'foo' AS str,
Expand All @@ -64,7 +66,7 @@ def bring_up(self):
""" # noqa
elif self.engine.name == 'bigquery':
create_tables = f"""
CREATE TABLE {self.schema_name}.{self.table_name} AS
CREATE TABLE {quoted_schema_and_table} AS
SELECT 123 AS num,
'123' AS numstr,
'foo' AS str,
Expand All @@ -79,7 +81,7 @@ def bring_up(self):
""" # noqa
elif self.engine.name == 'postgresql':
create_tables = f"""
CREATE TABLE {self.schema_name}.{self.table_name} AS
CREATE TABLE {quoted_schema_and_table} AS
SELECT 123 AS num,
'123' AS numstr,
'foo' AS str,
Expand All @@ -94,7 +96,7 @@ def bring_up(self):
""" # noqa
elif self.engine.name == 'mysql':
create_tables = f"""
CREATE TABLE {self.schema_name}.{self.table_name} AS
CREATE TABLE {quoted_schema_and_table} AS
SELECT 123 AS num,
'123' AS numstr,
'foo' AS str,
Expand Down

0 comments on commit 4404d75

Please sign in to comment.