csv lookup question

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

csv lookup question

Post by gooogle »

I am using DS 8.1 server.
I have a CSV file with data such as below:

from=jack, ac= 12345, to= jill, amount= 123.

from this comma seperated string i need to look up
from = person name & to = person name. i have a separate table with names to lookup from

i need to find out who is paying to who & how much from the csv file ? how do i do that ?

plzz help

thanks
Last edited by gooogle on Tue Jun 22, 2010 9:52 am, edited 1 time in total.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Load CSV file into hash file. Use the hash file for lookup
You are the creator of your destiny - Swami Vivekananda
gooogle
Participant
Posts: 42
Joined: Tue Feb 23, 2010 3:40 pm

Post by gooogle »

anbu wrote:Load CSV file into hash file. Use the hash file for lookup
after converting to hash file

how can i read which party paid who ?
i mean how can i seperate that as the data i am getting is like a string only seperated by commas such as (payfrom= john, payto= jill, amount=100)


thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Take this problem in small steps. First you need to load your file into a hashed file or a database table. In order to do that, you need to create a DDL or schema of what that table should look like. Is it correct to assume that a table/file in the form of:

Code: Select all

Name    Type
FROM     VarChar
ACCUNT VarChar
TO         VarChar
AMOUNT VarChar
is what is contained in your input file?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

anbu wrote:Load CSV file into hash file. Use the hash file for lookup
It's hashed file, not hash file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

ray.wurlod wrote:
anbu wrote:Load CSV file into hash file. Use the hash file for lookup
It's hashed file, not hash file.
ok. Thanks Ray
You are the creator of your destiny - Swami Vivekananda
Post Reply