cancel
Showing results for 
Search instead for 
Did you mean: 

accessing a very large key-value pair

former_member200339
Participant
0 Kudos

Hi All,

I am developing a scenario where I need to access a very large key-value pairs i.e. 3000 pairs in my mapping. I have put all the details in a properties file and saved the file in the PI directory. Then I read the file from a UDF in a mapping.

 

Properties prop= new Properties(); 

InputStream input = this.getClass().getClassLoader().getResourceAsStream(file_path);

prop.load(input);

Please let me know if there are any other easier ways of doing it.

Thanks and Regards,

Rana Brata De

SAP PI Consultant

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Since you have around 3000 pairs and if the data grows further (if possibility) then write in the db table and use jdbc lookup in the mapping. We use jdbc lookup in many interfaces and no issues with respect to performance. This is my two cents. Ofcourse I do like Value mapping replication and my concern is about monitoring.

udo_martens
Active Contributor
0 Kudos

Hi,

A value mapping replication is a high quality solution, but requires some effort. You would have a good performance (because the data are cached), be flexible and in the standard. Your solution is much cheaper but indivudal (less flexible and worse monitoring) and the data are read again for each execution of the mapping.

/Udo