Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I have input dataset in the form of excel file with following format:
Target Dataset if postgresql table with following def:
CREATE TABLE dl_insight_zone.DIM_INITIATIVE(INIT_UNIQUE_ID SERIAL PRIMARY KEY,WORK_ID varchar(80),WORK_NAME text,RF_NAME text);
I want to create auto-generated primary key with each record insertion. However, I am not able to do that. Please suggest options with sync/prepare recipe or any other way to do this.
Hi @chiraggiri ,
You can accomplish this by using a Window recipe to create an auto-incrementing column, and then setting the column as the primary key:
Rebuild the dataset. The auto-incrementing column should now be the primary key.
Here's a picture of how it looks in the flow. prod_rate is the Excel dataset, and prod_rate_window is the Postgres dataset:
Feel free to let me know if you have any questions.
Post a Question