table deployment (DDL) from one catalog to another
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 06:19 AM
Hello
We have a development, a test and a production environment
How do you generally deploy DDL changes?
So, alter a table in development and apply to test then production
e.g.
table1 has column1, column2, column3
I add column4
I now want to deploy this change to production
I also want to retain data
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 10:28 AM
Hi @dpc ,
- Managing DDL changes accross environments (dev, test, prod) will be a part of your CI/CD pipeline.
- Create a Deployments folder, with subfolders. Each deployment will be represented by a timestamped folder. Example folder structure:
/Deployments
/Deployments_20240924
/01_add_column4_table1.sql
/02_alter_other_table.sql
/Deployments_20240930
/01_create_new_table.sql
/02_update_table1.sql
- Inside the folder, each script (e.g., 01_add_column4_table1.sql) represents individual DDL changes (like adding a column or altering a table).
- You can then integrate your CI/CD pipeline with the deployment folder
- Add deployment folder name to your CI/CD pipeline
- After your notebooks are deployed, add to the pipeline the step to run the Notebooks that are inside the provided deployment pipeline
- Alternatively, for every deployment you can create a deployment Job. Each job will have multiple tasks, where each task represent a specific DDL change. In the example, you would create Deployment_20240924 job, that would have 2 steps: to run 01_add_column4_table1.sql and then to run 02_alter_other_table.sql.
- Running the job could also be a step in your CI/CD pipeline
- Alternatively, the job could already be scheduled to run at a given time (but you need to know when you deployment is going to happen
- Alternatively, the job could be run manually after the CI/CD pipeline finishes deploying the notebooks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 09:06 AM
Thanks.
I'll step through this solution and see if I can get it working