Skip to content

Commit

Permalink
Trino migration to remove aws_openshift_daily (project-koku#4408)
Browse files Browse the repository at this point in the history
It will get recreated with new columns.
  • Loading branch information
samdoran authored Jun 1, 2023
1 parent 43eacc9 commit 7c94c8d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/cji_scripts/migrate_trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ def main():
logging.info("Running against the following schemas")
logging.info(schemas)

# tables_to_drop = [
# "aws_line_items_daily",
# ]
tables_to_drop = [
"aws_openshift_daily",
]
# columns_to_drop = ["ocp_matched"]
columns_to_add = {
"calculated_amortized_cost": "double",
"markup_cost_amortized": "double",
}
# columns_to_add = {
# "calculated_amortized_cost": "double",
# "markup_cost_amortized": "double",
# }

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, "reporting_ocpawscostlineitem_project_daily_summary", 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, "reporting_ocpawscostlineitem_project_daily_summary", CONNECT_PARAMS)
logging.info(f"*** Dropping tables {tables_to_drop} for schema {schema} ***")
drop_tables(tables_to_drop, CONNECT_PARAMS)


if __name__ == "__main__":
Expand Down

0 comments on commit 7c94c8d

Please sign in to comment.