cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi All,

I am doing a File - to - JDBC scenario. In this I am getting a CSV file from source.

What is the required information I have to ask the client to convert this flat file to an XML file using XI like file structure, lenths. what are all the other information required for this.

Could anybody please tell me what is csv file, how to convert it to xml.

If possible, please suggest screen shots.

Thanks in advance.

Regards,

Anu.

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Anu,

CSV File :- "Comma Seperator Value" CSV file is nothing but a text file (.txt) with the seperator between the field values as ',' comma.

- You need only one sample CSV file. So you just ask your client to provide you one sample CSV file that they are going to send to XI.

Suppose we have a flat file that looks like this:

"X22",01,"REN",69910,272527,09

"Z11","VR",13245,20050

"Z11","VR",12345,90090

"B16","VR00027"

With various field lengths and have a variable number of substructures for Recordset Structure, then the substructures can occur multiple times,must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. You must specify a key field and the key fields are A1,sub1 and sub2 and the constant values X22, Z11 AND B16.

In the configuration part

1) Specify the adapter type as sender

2) Message protocol to file content conversion

3) Set the Content conversion parameters

a) Document Name-Message Type (mi_test) inserted in the message as the main XML tag

b) Document Namespace-http://wipro/venksworkshop, namespace is added to the name of the document

c) Recordset Name- Root, Specify the name of the structure.

d) Recordset Structure-specify the sequence and the number of substructures A1,1, sub1,, sub2,

e) Key Field Name - KF

f) Key Field Type u2013 String

4) Define the additional parameters

-A1.fieldNames:F1,F2,F3,F4,F5,F6

-A1.fieldSeparator: ,

-A1.endSeparator:'nl'

-A1.processFieldNames: fromConfiguration because in our example the flat file does not contain any header

Add similar Parameters for sub1 and sub2

Add key field value parameters to identify the substructures in the recordset

-A1.keyFieldValue: "X22"

-sub1.keyFieldValue: "Z11"

-sub2.keyFieldValue: "B16"

This configuration should convert the flat file into an XML message like this:

Regards,

Abid Mazhar