Solved

how to concat empty string

  • 16 March 2023
  • 4 replies
  • 113 views

my input data is like to be a 

concat employment all columns in single column but shows error

Invalid expression '${str:concat(record:value('/"employement_details.0.CurrentCompany"'),record:value('/"employement_details.0.c2HhPayroll"')(record:value('/"employement_details.0.c2HhPayroll"')))}': com.streamsets.pipeline.api.el.ELEvalException: CTRCMN_0101 - Error parsing expression ${str:concat(record:value('/"employement_details.0.CurrentCompany"'),record:value('/"employement_details.0.c2HhPayroll"')(record:value('/"employement_details.0.c2HhPayroll"')))}: javax.servlet.jsp.el.ELException: Encountered "(", expected one of [".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", ")", ",", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"]

icon

Best answer by Bikram 16 March 2023, 22:00

View original

4 replies

Userlevel 5
Badge +1

@deepikamani007 

 

Kindly let me know if the concate function works for you or not.’

Please provide me the inputs details for which you are facing issues ,so i can help you on it.

 

Thanks & Regards

Bikram_

Userlevel 5
Badge +1

@deepikamani007 

If you follow the last case which i given to you where multiple Columns concatenated.

its possible to concatenate as many columns .

if you are having issues , please let me know i will help you on it.

 

Bikram_

@deepikamani007

 

I believe you are trying to concate two string values and with space separator. Please find below the code snippet for the same , i hope it helps.

 

Case 1:

String concate code with space separator:

 

${str:concat(str:concat(record:value('/"employement_details.0.CurrentCompany"'),' '),record:value('/"employement_details.0.c2HhPayroll"'))}

 

Case 2:String concate code with nospace separator:

${str:concat(record:value('/"employement_details.0.CurrentCompany"'),record:value('/"employement_details.0.c2HhPayroll"'))}

 

Case 3 : String concatenate without str:concat function :

${record:value('/"employement_details.0.CurrentCompany"')}  ${record:value('/"employement_details.0.c2HhPayroll"')} ${record:value('/"employement_details.0.ctc"')}

 

 

Thanks & Regards

Bikram_

mutiplile columns  concat is  possibile or not . but i want multipile concat columns ..how to achieve this.

Userlevel 5
Badge +1

@deepikamani007 

 

I believe you are trying to concate two string values and with space separator. Please find below the code snippet for the same , i hope it helps.

 

Case 1:

String concate code with space separator:

 

${str:concat(str:concat(record:value('/"employement_details.0.CurrentCompany"'),' '),record:value('/"employement_details.0.c2HhPayroll"'))}

 

Case 2:String concate code with nospace separator:

${str:concat(record:value('/"employement_details.0.CurrentCompany"'),record:value('/"employement_details.0.c2HhPayroll"'))}

 

Case 3 : String concatenate without str:concat function :

${record:value('/"employement_details.0.CurrentCompany"')}  ${record:value('/"employement_details.0.c2HhPayroll"')} ${record:value('/"employement_details.0.ctc"')}

 

 

Thanks & Regards

Bikram_

Reply