How to generate primary key column for each row in a document

Hi All ,

I wanted to load from csv to anaplan and need to generate a id column using sequence
number .

lets see if i have 100 rows in one document so , anaplan id column should be loaded through snaplogic with id as CS1,CS2,CS3 and so on and next time in the arrival of new document it should be incremented from cs101 onwards and so on .

I searched through snaplogic and its showing as document wise we can add sequence number which is not my requirement .

Thanks ,

Hi Guys ,

Attached the Pipeline .Please refer in case needed .

I used below process to meet my above requirements .I am using snap.out.totalCount expression to generate the sequence .

First I create 2 table’s in postgres .

This table keeps the track of max of sequence number .
create table Diretory_uniqueid
ID integer
insert into Diretory_uniqueid values(0);

Prim_Key varchar(200),
Department varchar(200),
Dept_ID integer,
Email varchar(200),
Extensionn varchar(20),
Location varchar(200),
Name varchar(200),
Title varchar(200)

this is my main table where prim_key is the key auto increment column .

Below is the snapshot of the Pipeline .

Sequence Generator Pipeline_2019_04_02.slp (19.8 KB)

After load sequence track table shows below :
main table records :