diff --git a/scripts/cji_scripts/migrate_trino.py b/scripts/cji_scripts/migrate_trino.py index f3697198f8..937dbfa50c 100755 --- a/scripts/cji_scripts/migrate_trino.py +++ b/scripts/cji_scripts/migrate_trino.py @@ -111,29 +111,25 @@ def drop_table_by_partition(table, partition_column, conn_params): def main(): - logging.info("Running the hive migration for OCP/GCP additional cost fields") - logging.info("fetching schemas") schemas = get_schemas() logging.info("Running against the following schemas") logging.info(schemas) - # tables_to_drop = [ - # "reporting_ocpazurecostlineitem_project_daily_summary_temp", - # "reporting_ocpawscostlineitem_project_daily_summary_temp", - # "reporting_ocpgcpcostlineitem_project_daily_summary_temp", - # ] + tables_to_drop = [ + "openshift_pod_usage_line_items_daily", + ] # columns_to_drop = ["ocp_matched"] - columns_to_add = { - "node_role": "varchar", - } + # columns_to_add = { + # "node_role": "varchar", + # } for schema in schemas: CONNECT_PARAMS["schema"] = schema - logging.info(f"*** Adding column to tables for schema {schema} ***") - add_columns_to_table(columns_to_add, "openshift_pod_usage_line_items_daily", CONNECT_PARAMS) - # logging.info(f"*** Dropping tables {tables_to_drop} for schema {schema} ***") - # drop_tables(tables_to_drop, CONNECT_PARAMS) + # logging.info(f"*** Adding column to tables for schema {schema} ***") + # add_columns_to_table(columns_to_add, "openshift_pod_usage_line_items_daily", CONNECT_PARAMS) + logging.info(f"*** Dropping tables {tables_to_drop} for schema {schema} ***") + drop_tables(tables_to_drop, CONNECT_PARAMS) if __name__ == "__main__":