Solved

insert blank values in xlxs file into a Null Values ?

  • 11 September 2023
  • 11 replies
  • 48 views

Userlevel 2

i used expression evaluator to give or insert blank record values into Null Values ,how can i achieve this .
this is my incoming data from origin.
 

these type field had Blank ,but i want to feed Null ..i used this expression:
${str:isNullOrEmpty(record:value('/TYPE_1099'))?NULL:record:value('/TYPE_1099')} but it fails .

 

icon

Best answer by Bikram 13 September 2023, 23:32

View original

11 replies

Userlevel 5
Badge +1

@lakshmi_narayanan_t 

The string is neither empty not NULL , can you please give a try with the below syntax and check if it works.

${record:value('/TYPE_1099')?record:value('/TYPE_1099'):NULL}

 

In this case there is no value for TYPE_1099 ,so that’s reason its throwing error. 

 

I noticed you are trying to assign NULL value to the string , kindly provide me the pipeline or test file ,so i can check and help you on the same.

 

Thanks & Regards

Bikram_

 

 

Userlevel 2

@lakshmi_narayanan_t

The string is neither empty not NULL , can you please give a try with the below syntax and check if it works.

${record:value('/TYPE_1099')?record:value('/TYPE_1099'):NULL}

 

In this case there is no value for TYPE_1099 ,so that’s reason its throwing error. 

 

I noticed you are trying to assign NULL value to the string , kindly provide me the pipeline or test file ,so i can check and help you on the same.

 

Thanks & Regards

Bikram_

 

 

i  followed you expression but it  shows  error 
expression used =${record:value('/TYPE_1099')?record:value('/TYPE_1099'):NULL}}


out-put shows excess brackets as a string ,so i reconfigured the expression to remove one brackets like expression used =${record:value('/TYPE_1099')?record:value('/TYPE_1099'):NULL}
again same error 
 

 

Userlevel 5
Badge +1

@lakshmi_narayanan_t

My bad there was type in the syntax , can you try with below and check if it helps.

${record:value('/TYPE_1099')?NULL:record:value('/TYPE_1099')}

Userlevel 2

@lakshmi_narayanan_t

My bad there was type in the syntax , can you try with below and check if it helps.

${record:value('/TYPE_1099')?NULL:record:value('/TYPE_1099')}

again same issue
 


There is No change in field values.
 

 

Userlevel 5
Badge +1

@lakshmi_narayanan_t 

 

If its possible kindly provide me the test file and also let me know the source from where you are fetching data from the file,so i can help you on the same.

Pipeline will be good for me also if its possible.

 

Thanks & regards

Bikram_

Userlevel 2

@lakshmi_narayanan_t

 

If its possible kindly provide me the test file and also let me know the source from where you are fetching data from the file,so i can help you on the same.

Pipeline will be good for me also if its possible.

 

Thanks & regards

Bikram_

i fetch my file from spreedsheet like XLSX file format from origin directory.

Userlevel 5
Badge +1

@lakshmi_narayanan_t 

can you please provide me the test file which contains empty value in the shell ,so i can validate in my SDC and try to help you on the same.

Thanks & Regards

Bikram_

Userlevel 2

@lakshmi_narayanan_t

can you please provide me the test file which contains empty value in the shell ,so i can validate in my SDC and try to help you on the same.

Thanks & Regards

Bikram_

this is my test file i  provide for your refference .
thank you 

Userlevel 5
Badge +1

@lakshmi_narayanan_t 

Kindly try with below code snippet and let me know if it helps. I also attached the pipeline for your reference.

Kindly use it in expression evaluator

${str:length(record:value('/VENDOR_NAME_ALT')) != 0 ? record:value('/VENDOR_NAME_ALT') : 'null'}


or

${record:value('/VENDOR_NAME_ALT')? record:value('/VENDOR_NAME_ALT') : 'null'}

 

 

 

 

Thanks & Regards

Bikram_

Userlevel 2

@lakshmi_narayanan_t

Kindly try with below code snippet and let me know if it helps. I also attached the pipeline for your reference.

Kindly use it in expression evaluator

${str:length(record:value('/VENDOR_NAME_ALT')) != 0 ? record:value('/VENDOR_NAME_ALT') : 'null'}


or

${record:value('/VENDOR_NAME_ALT')? record:value('/VENDOR_NAME_ALT') : 'null'}

 

 

 

 

Thanks & Regards

Bikram_

at the same time i want to write the file as XLSX file format in local file destination ,but possibile only text file .

Userlevel 2

@lakshmi_narayanan_t

Kindly try with below code snippet and let me know if it helps. I also attached the pipeline for your reference.

Kindly use it in expression evaluator

${str:length(record:value('/VENDOR_NAME_ALT')) != 0 ? record:value('/VENDOR_NAME_ALT') : 'null'}


or

${record:value('/VENDOR_NAME_ALT')? record:value('/VENDOR_NAME_ALT') : 'null'}

 

 

 

 

Thanks & Regards

Bikram_

At the same time I want give null values to all incoming columns had Blank   values ,if any other processor can done this job because I had  many columns ,so it really  time consume to manually type column.

Reply