Drop the specified 'target_db' and all its tables
()
| 46 | 'warehouse', 'web_page', 'web_returns', 'web_sales', 'web_site'] |
| 47 | |
| 48 | def clean_data(): |
| 49 | """Drop the specified 'target_db' and all its tables""" |
| 50 | with cluster.impala.cursor() as impala: |
| 51 | tbls_to_clean = tpch_tables if workload.lower() == 'tpch' else tpcds_tables |
| 52 | # TODO: Replace with DROP DATABASE CASCADE when it is supported for Kudu tables |
| 53 | for table_name in tbls_to_clean: |
| 54 | impala.execute("drop table if exists {}.{}".format(target_db, table_name)) |
| 55 | impala.drop_db_if_exists(target_db) |
| 56 | |
| 57 | def load_data(): |
| 58 | sql_params = { |
no test coverage detected