Skip to main content
Solved

how to concat empty string


deepikamani007
Fan

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", "||", "?"]

Best answer by 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_

View original
Did this topic help you find an answer to your question?

Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • March 16, 2023

@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_


deepikamani007
Fan
Bikram wrote:

@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.


Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • March 17, 2023

@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_


Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • March 17, 2023

@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_


Reply