Skip to main content

The source csv file has splitted into 13 rows for each actual row in target.By using Ataccama one desktop we would like to pivot the data by sending source 13 rows into one row in target.

 

I am trying to implement the logic below in the Text file reader step but it's not working .

 

v_RowNum =  iif(v_RowNum IS  NULL,0,v_RowNum+1)                    -------- Initialize v_RowNum to 0 if NULL; otherwise, increment it by 1 for each row.
v_CurrentNumber =  iif(v_CurrentNumber%13= 0, v_CurrentNumber+1,  v_CurrentNumber  ).    -- Increment v_CurrentNumber by 1 for every 10 rows.
GENERATED_NUMBER= v_CurrentNumber GENERATED_NUMBER INTEGER 

 

 

Please  help us  to make it work in Ataccama one desktop .

Hi @mahesh Ar

To generate same number for every 13 rows you can add following expression to the Shadow Columns section of Text File Reader:

sequence(0) div 13 + 1

 


Thanks @AKislyakov It’s working as i expected .


Reply