Skip to content

Commit e291018

Browse files
authored
[COST-4713] Azure OpenShift daily trino migration (#4958)
1 parent 75ff99b commit e291018

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

scripts/cji_scripts/migrate_trino.py

+15-17
Original file line numberDiff line numberDiff line change
@@ -162,26 +162,24 @@ def main():
162162
logging.info("Running against the following schemas")
163163
logging.info(schemas)
164164

165-
# tables_to_drop = [
166-
# "azure_openshift_daily_resource_matched_temp",
167-
# "azure_openshift_daily_tag_matched_temp",
168-
# "reporting_ocpazurecostlineitem_project_daily_summary_temp",
169-
# ]
165+
tables_to_drop = [
166+
"azure_openshift_daily",
167+
]
170168
# columns_to_drop = ["ocp_matched"]
171-
columns_to_add = {
172-
"subscription_name": "varchar",
173-
}
169+
# columns_to_add = {
170+
# "subscription_name": "varchar",
171+
# }
174172
for schema in schemas:
175173
CONNECT_PARAMS["schema"] = schema
176-
logging.info(f"*** Adding column to tables for schema {schema} ***")
177-
add_columns_to_table(columns_to_add, "reporting_ocpazurecostlineitem_project_daily_summary", CONNECT_PARAMS)
178-
add_columns_to_table(columns_to_add, "azure_openshift_daily_resource_matched_temp", CONNECT_PARAMS)
179-
add_columns_to_table(columns_to_add, "azure_openshift_daily_tag_matched_temp", CONNECT_PARAMS)
180-
add_columns_to_table(
181-
columns_to_add, "reporting_ocpazurecostlineitem_project_daily_summary_temp", CONNECT_PARAMS
182-
)
183-
# logging.info(f"*** Dropping tables {tables_to_drop} for schema {schema} ***")
184-
# drop_tables(tables_to_drop, CONNECT_PARAMS)
174+
# logging.info(f"*** Adding column to tables for schema {schema} ***")
175+
# add_columns_to_table(columns_to_add, "reporting_ocpazurecostlineitem_project_daily_summary", CONNECT_PARAMS)
176+
# add_columns_to_table(columns_to_add, "azure_openshift_daily_resource_matched_temp", CONNECT_PARAMS)
177+
# add_columns_to_table(columns_to_add, "azure_openshift_daily_tag_matched_temp", CONNECT_PARAMS)
178+
# add_columns_to_table(
179+
# columns_to_add, "reporting_ocpazurecostlineitem_project_daily_summary_temp", CONNECT_PARAMS
180+
# )
181+
logging.info(f"*** Dropping tables {tables_to_drop} for schema {schema} ***")
182+
drop_tables(tables_to_drop, CONNECT_PARAMS)
185183

186184

187185
if __name__ == "__main__":

0 commit comments

Comments
 (0)