cancel
Showing results for 
Search instead for 
Did you mean: 

How to skip header record from simple Plain2XML (file type is .csv,SFTP Sender adapter)

former_member197830
Participant
0 Kudos

Hi,

Can any one help us how skip header record in case of simple plain2XML and my file looks below



Regards,

Narasaiah T.

Accepted Solutions (1)

Accepted Solutions (1)

asdasd_asdasd
Active Participant
0 Kudos

Hi,

The "Plain2XML" does not have that feature, you'll have to remove it from the mapping, for example using a global variable as a flag.

Best Regards.

former_member197830
Participant
0 Kudos

Hi Colman,

How to do mapping level by using global variable ?

Regards,

Narasaiah T

asdasd_asdasd
Active Participant
0 Kudos

Check this

  1. Create the global variable "the flag" as "String/Boolean"
  2. Create a UDF that read the flag, if "the flag" is "empty/false" then change "the flag value to X/true" and return "HEADER".
  3. Use the UDF in the root of your target message, if the value is not "HEADER" then map the root element.
former_member197830
Participant
0 Kudos

Hi Colman,

How to find out Edit Java Section in PI 7.3 and can you please send some udf code and in which area i need to assign that udf ?

My mapping is like :

Regards,

Narasaiah.

asdasd_asdasd
Active Participant
0 Kudos

Check this:

Best Regards.

vishnu_pallamreddy
Contributor
0 Kudos

Hi Nurse,

please try this

parameter name:xml.processfieldNames

Parameter Value: fromFile

xml.documentsSkipFirstRows = 1

engswee
Active Contributor
0 Kudos

You don't need to use any UDF or global variable. This can be achieved by standard mapping functions. Just check the index of each line, and skip the first line.

An example below. As the queue shows, the first line will be suppressed in the output.

Note: I'm not sure whether your unbounded source node Orders is mapped to target STATEMENT or access.

former_member197830
Participant
0 Kudos

Hi Eng Swee Yeoh,

Thanks a lot .

Answers (1)

Answers (1)

Former Member
0 Kudos

try xml.documentsSkipFirstRows = 1

refer thread