File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ func run_sql(code) {
55}
66
77// Cleanup
8- func cleanup () {
8+ func cleanup_double_quote () {
99 run_sql("DROP TABLE IF EXISTS \"Rating\"")
1010 run_sql("DROP TABLE IF EXISTS \"tmp_rating\"")
1111 run_sql("DROP TABLE IF EXISTS \"Rating_del1\"")
@@ -17,7 +17,24 @@ func cleanup() {
1717 commit()
1818}
1919
20- cleanup()
20+ func cleanup_backtick() {
21+ run_sql("DROP TABLE IF EXISTS `Rating`")
22+ run_sql("DROP TABLE IF EXISTS `tmp_rating`")
23+ run_sql("DROP TABLE IF EXISTS `Rating_del1`")
24+ run_sql("DROP TABLE IF EXISTS `Rating_update1`")
25+ run_sql("DROP TABLE IF EXISTS `Rating_update001p`")
26+ run_sql("DROP TABLE IF EXISTS `Rating_update1p`")
27+ run_sql("DROP TABLE IF EXISTS `Rating_del1p`")
28+ run_sql("DROP TABLE IF EXISTS `Rating_update50p`")
29+ commit()
30+ }
31+
32+ if (db_type == "mysql") {
33+ cleanup_backtick()
34+ }
35+ else {
36+ cleanup_double_quote
37+ }
2138
2239// Import CSV
2340if (db_type == "snowflake") {
You can’t perform that action at this time.
0 commit comments