Skip to main content

hi Team, 

i need to split a word based on a delimiter and try to add inceremental number to it, can you please help in acheiving this scenario.

Input : select * from order;select * from customer

output should be like select * from order - query 1, select * from customer - query 2

i itried using split operator , but could not able to append the incremental number

Can you pls provide update on above ask


Hi @rajeswarimyla ,

You can modify the component from https://community.ataccama.com/questions/651 and add a column assigner step after the ‘word split on semi colon’ step to append the string ‘query -’ followed by a sequence generator method. A sample expression would be:

Output would look like this:

 

 


Thanks for your response, is there a way to reset sequence generator by grouping a separate column like this

My json file contains input like this

 

Assessment Name

Query

Output expected

1000151- DM Asesment

Select * from emp1;select * from emp2

100151- DM Assement – Query - 1
100151- DM Assement – Query - 2

1000152 – DM Assessment

Select * from customer1;select * from customer 2

100152- DM Assement – Query - 1
100152- DM Assement – Query - 2

100153 – DM Assessment

Select * from order1;select * from order 2

100153- DM Assement – Query - 1
100153- DM Assement – Query - 2

 

Output generated is

100151- DM Assement – Query - 1
100151- DM Assement – Query – 2

100152- DM Assement – Query - 3
100152- DM Assement – Query – 4

100153- DM Assement – Query - 5
100153- DM Assement – Query - 6

 


Hi @rajeswarimyla ,

You can achieve this by adding an expression that will use the running sequence and a grouping step. Updated component is attached herewith. 
 

 


Reply


ataccama
arrows
Lead your team  forward  OCT 24 / 9AM ET
×