cancel
Showing results for 
Search instead for 
Did you mean: 

configuring file adapter to convert xml to csv

Former Member
0 Kudos

Hi experts,

I was new to PI and with extensive reading on SDN and your tips I could successfully configure file adapter to convert xml to csv. I have the following requirements which I could find much information anywhere.

1) I create XML using ABAP call transformation and when I create XSD using xml spy, it creates 2 xsds! I can download xsds into integration repository but is there any way I can call xsd by reference in IR? For example I have xsd1 which has reference to xsd2 by using <import> attribute. How can I tell XSD1 to look for XSD2 in integration repository? Is it possible?

Otherwise can I create 2 interface mappings one should convert xml1 to xml2 and the another one should take this xml2 as outbound file and convert to xml3 which is the final xml I would want to work with.

2) I have been researching this but not much luck. I have a file in source directory on AIX server (XXX201) for example /usr/path1. I want to move this file to another server (XXX240) for exampe /usr/path2. I want to then use this /usr/path2 as my source directory in sender communication channel. How can I do this in PI?

Any feedback would be greatly appreciated.

Thanks.

--Mithun

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

is there any way I can call xsd by reference in IR? For example I have xsd1 which has reference to xsd2 by using <import> attribute. How can I tell XSD1 to look for XSD2 in integration repository? Is it possible?

Yes, it is possible. You can do this by:

1.) Open xsd1 in IR, then go to the external references references tab

2.) Click xsd2, after it is highlighted, then press ctrl+c (copy)

3.) Open xsd2 in IR

4.) Under Source (just below the File), paste the copied value

5.) Save and activate

I want to move this file to another server (XXX240) for exampe /usr/path2.

The file would be unchanged when it is moved to this server, why not just poll from the original directory?

Regards,

Mark

Former Member
0 Kudos

Thanks Mark. The reason to move file is because my file is created on server1 but PI is running on server 2. I have to first move the file from server1 to server2 so that PI can pick up and process the file.

Former Member
0 Kudos

Hi Mithun Dha,

The answer for your second question goes like this.

There is a concept called as "Mounting" in Operation Systems. The file server or directories of a OS can be mounted on the file server of a different server. For some ext application like PI, this is abstract. Pls check with the OS team on this.

Moreover, copying a file to the PI file server and then executing the interface is not a good option.

Its better to directly pick up the file from the source folder by either using FTP or sFTP and then running the interface.

Regards,

Younus

Former Member
0 Kudos

hi,

1. you can. I believe since version 7.0 or 7.1 the IR recognizes <xsd:import> statements. but you might need to do more reasearch about it

2. you can either mount the file system from the target server on your source and then use a script, or i would suggest using ftp (if this is internal) or sftp to move it. then depending on the rights of your user you can use the full path to put the file there

Former Member
0 Kudos

Thanks for the reply ciochinah .

I found out option 1 ia available only in PI 7.1

Coming to my question 2, I create a file on some directory in unix and I want to move the file from unix server for example cgunxXXX to PI server cgunxXXX and then use it as a source file in my PI sender communication channel. I see there is a "operating system commands" you can run and I have done my reserach and I don't know much about UNIx command. I did learn some from my research but not sure how to go about it. Any help will be appreciated.

Thanks.

--Mithun