cancel
Showing results for 
Search instead for 
Did you mean: 

Info required for flat file lookup

Former Member
0 Kudos

Hi Gurus,

I'm having a requirement where in which I need to do a flatfile lookup in a mapping.

I refered to one blog:

Which adapter I need to create fot his mapping lookup?(JDBC or File)

Since Mapping Lookup supports only SOAP,RFC and JDBC adapter type communication channels.

So if I'm creating communication channel of JDBC adapter type, what driver name I need to specify and what connection I need to give?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

ok

Former Member
0 Kudos

Hi I think the connection parameters in JDBC adapter might be,

JDBC Driver: com.jdbc.MySQL.Driver

Connection: jdbc:oracle:thin:@<server IP>:<port>:<DataSource name>

Here if I use Mysql driver then what is the port I need to give?

Server IP I can give where the file residing?

What is the port that I need to give?

What is the data souce(generally it is table Name) I need to give? but here I'm looking into Txt file.

Former Member
0 Kudos

>>I'm having a requirement where in which I need to do a flatfile lookup in a mapping

No Adapter is required for File look up. Refer above link.

For File lookup you have to create a UDF. and in that u hav to write a code that wil connect with the FTP server and read the file.

Thanks

Farooq

Edited by: Farooq Farooqui on Aug 8, 2008 3:58 PM

Former Member
0 Kudos

Farooq Farooqui

Thanks for your reply

But my flat file is in NFS, no need of FTP.

If this is the case How I need to go about?

Former Member
0 Kudos

In this case you have to specify the path where file is located. like C:/XI/Root/input/test.xml

Here is the code to read the file.

http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html

Thanks

Farooq

Former Member
0 Kudos

Use my Wiki page https://wiki.sdn.sap.com/wiki/display/XI/FileLookupin+UDF for File look-up

Thanks

Farooq

Former Member
0 Kudos

Hi farooq,

I am having a similar requirement as mentioned in your blog.I tried to implement the same but i am getting some errors

1.For using URL class in the UDF ,which package we need in imported.I am getting an error "cannot resolve symbol URL class and URL connection class"

2.The information stored in the file which i am using is not having "=" instead it has a ":" in between the source and the value

like in this case it will look like :FFFF:66666 in my file.

Can we do the lookup if the file is in this format ?

Your inputs will help me allot

Regards

Sri