MCPcopy Create free account
hub / github.com/apache/impala / clean_data

Function clean_data

testdata/bin/load-tpc-kudu.py:48–55  ·  view source on GitHub ↗

Drop the specified 'target_db' and all its tables

()

Source from the content-addressed store, hash-verified

46 'warehouse', 'web_page', 'web_returns', 'web_sales', 'web_site']
47
48def 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
57def load_data():
58 sql_params = {

Callers 1

load-tpc-kudu.pyFile · 0.85

Calls 4

cursorMethod · 0.45
executeMethod · 0.45
formatMethod · 0.45
drop_db_if_existsMethod · 0.45

Tested by

no test coverage detected