Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Automatically update newly added columns

Hi all,

I am looking for guidance, if the following routine can be automatized in Talend?

 

I have multiple Redshift tables, which are already containing billions of records, but sometimes I need to add new columns. All of the added columns should be NOT NULL and it must not have a default value. The workaround that we currently have, is that we implement the new columns with NOT NULL and a default value, then we are populating the column with data, after that we are creating a new table with the same columns, but without the default value, then we are loading everything from the source table to the newly created one, then we are dropping the original table, and renaming the newly created table. 

 

So the steps are the following:

 

  1. Adding new column with NOT NULL DEFAULT = something
  2. Update new column with data
  3. Create new database with same columns as the original one, but the new column are NOT NULL without default
  4. Inserting everyhing from original table to the new table
  5. Dropping the old table
  6. Renaming the new table

 

Is it possible to automatize this procedure? 

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina