Skip to content

Commit 5dc9d8a

Browse files
authored
Merge pull request #265 from melange396/temporary_table_is_evil
TEMPORARY TABLE is evil
2 parents 2080f6e + 51d85a7 commit 5dc9d8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/acquisition/covidcast/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def insert_or_update_batch(self, cc_rows, batch_size=2**20, commit_partial=False
108108

109109
# TODO: this heavily copypastas src/ddl/covidcast.sql -- theres got to be a better way
110110
create_tmp_table_sql = f'''
111-
CREATE TEMPORARY TABLE `{tmp_table_name}` (
111+
CREATE TABLE `{tmp_table_name}` (
112112
`source` varchar(32) NOT NULL,
113113
`signal` varchar(64) NOT NULL,
114114
`time_type` varchar(12) NOT NULL,
@@ -129,7 +129,7 @@ def insert_or_update_batch(self, cc_rows, batch_size=2**20, commit_partial=False
129129
'''
130130

131131
truncate_tmp_table_sql = f'TRUNCATE TABLE {tmp_table_name};'
132-
drop_tmp_table_sql = f'DROP TEMPORARY TABLE {tmp_table_name}'
132+
drop_tmp_table_sql = f'DROP TABLE {tmp_table_name}'
133133

134134
insert_into_tmp_sql = f'''
135135
INSERT INTO `{tmp_table_name}`

0 commit comments

Comments
 (0)