Interpreting Record format

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Vino_joe84
Participant
Posts: 28
Joined: Mon Nov 06, 2006 5:44 am
Location: chennai

Interpreting Record format

Post by Vino_joe84 »

Hi,

We have the sample record like the one below.

"10","vino","apple","ram"


Delimiter is ","

How do we interpret the same in DS.

Can you please help us to sort this issue?
J.Ithayavino
swapnilverma
Participant
Posts: 135
Joined: Tue Aug 14, 2007 4:27 am
Location: Mumbai

Re: Interpreting Record format

Post by swapnilverma »

Use sequential file stage and specify your delimiter in format tab.
Try some hands :idea: :idea: :idea: :idea:
Thanks
Swapnil

"Whenever you find whole world against you just turn around and Lead the world"
shamshad
Premium Member
Premium Member
Posts: 147
Joined: Wed Aug 25, 2004 1:39 pm
Location: Detroit,MI

Post by shamshad »

Your delimiter is COMMA and your COLUMN DELIMITER is DOUBLE QUOTE
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As you are importing the table definition for this particular sequential file, you will find that double-quoted CSV format (which is what you have) is the default, so all you need to do is to specify whether or not the first line is column headings.

The table definition will then be sitting in your Repository (hopefully with table and column descriptions having been added and guessed data types corrected) and need only be loaded into job designs - untouched by human hands and therefore at minimum risk of error.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Vino_joe84
Participant
Posts: 28
Joined: Mon Nov 06, 2006 5:44 am
Location: chennai

Post by Vino_joe84 »

I am not a premium user. Can you please share the solution with everyone including non premium user.
J.Ithayavino
ArindamBanerjee
Participant
Posts: 10
Joined: Tue Jun 19, 2007 9:44 pm
Location: Kolkata

Post by ArindamBanerjee »

Hi Vino,
Take a Sequential file stage.
Open the stage, add columns in Columns tab, set the file name in Properties tab. Check the options and set those which you like.
Go to Format tab. Final Delimeter is end. In Field Defaults, check whether the Delimeter is set to Comma, Quote will be Double in your case. Set appropriate NullField value if you wish to set some. Then go to View data button and see if you can correctly see the data.
Let me know if you face any problem.

I hate to bring this up, but in my opinion, this premium user thing should be removed. I previously worked in Microsoft Corp for 3 years and now working in this tool. The most beautiful thing in Microsoft SQL server or any other MS product is free availability of resources in net. In Datastage or any other tool I find the resources are really scarce, and if available, they are at a premium! I understand that to keep the site up and additional maintainance needs money, the resources who answer in this forum are busy and unless they have some monetary advantage, they will not be much interested to visit this site. On the contrary, money can be earned by posting ads, negotiating with IBM to donate and from there, etc. I had been associated with SQLServerCentral.com where they pay money to the author to write articles for them and they used to host those for free. The site is still free, but requires registration!

Please consider these possibilities also. Having free contents will make more hit to this site and will also attract ads.

Thanks,
Arindam
arindam.banerjee.in@gmail.com
Thanks,
~Arindam.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Vino_joe84 wrote:I am not a premium user. Can you please share the solution with everyone including non premium user.
No.

100% of revenue from premium memberships is devoted to meeting the hosting and bandwidth costs of DSXchange.

The company behind it is no Microsoft.

DSXchange does not make money. It is an all-volunteer site, and has to be paid for somehow. Premium membership is one of the ways.

When members were polled some time back, they were vehemently against advertising on DSXchange. That remains the case, as far as I am aware. Another thing about which members were very definite was that DSXchange must remain "at arm's length" from IBM.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArindamBanerjee
Participant
Posts: 10
Joined: Tue Jun 19, 2007 9:44 pm
Location: Kolkata

Post by ArindamBanerjee »

ray.wurlod wrote:
Vino_joe84 wrote:I am not a premium user. Can you please share the solution with everyone including non premium user.
No.

100% of revenue from premium memberships is devoted to meeting the hosting and bandwidth costs of DSXchange.

The company behind it is no Microsoft.

DSXchange does not make money. It is an all-volunteer site, and has to be paid for somehow. Premium membership is one of the ways.

When members were polled some time back, they were vehemently against advertising on DSXchange. That remains the case, as far as I am aware. Another thing about which members were very definite was that DSXchange must remain "at arm's length" from IBM.
When Microsoft became MICROSOFT, there were no company behind it too!
If it had been polled and majority voted for a paid content site (didnt understand the rationale!), I do not have anything to say, but I still believe that ads wont hurt if I am getting the actual knowledge out of the content!
And I am also unsure why you require to be "at arm's length", while discussing the technology of the particular company's product! This site is helping people across the globe who are using Datastage. In a way, you are helping IBM!
Anyway, these are solely my opinion and I was trying to help this site as well as every non-premium member of this site!

PEACE! :D
Thanks,
~Arindam.
Vino_joe84
Participant
Posts: 28
Joined: Mon Nov 06, 2006 5:44 am
Location: chennai

Post by Vino_joe84 »

Hi,

Our sequential file is .dat file and not .csv file.

ArindamBanerjee,

I have tried your approach. It shows the warning. Rows are not delimited.Contains long values.

Please let me know any other approaches to resolve this issue.
J.Ithayavino
ajay.vaidyanathan
Participant
Posts: 53
Joined: Fri Apr 18, 2008 8:13 am
Location: United States

Interpreting Record format

Post by ajay.vaidyanathan »

Hi,

Even if ur file is .dat, dats not at all a problem........U can still go ahead n follow d things Arindam Banerjee has said above...........In d Sequential file stage, add d necessary columns, set the file name. Go to Format tab. Final Delimeter is end. In Field Defaults, check whether the Delimeter is set to Comma, Quote as hee said, will be Double in your case. Then click d View data button and see if you can correctly see the data..........
Regards
Ajay
Vino_joe84
Participant
Posts: 28
Joined: Mon Nov 06, 2006 5:44 am
Location: chennai

Post by Vino_joe84 »

I have tried that approach. It shows the warning. Rows are not delimited.Contains long values.

Your help is appreciated.
J.Ithayavino
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Vino_joe84 wrote:It shows the warning.
You've mentioned this twice now, but I can't find a reference to what the warning actually is.
ArindamBanerjee
Participant
Posts: 10
Joined: Tue Jun 19, 2007 9:44 pm
Location: Kolkata

Post by ArindamBanerjee »

Vino_joe84 wrote:I have tried that approach. It shows the warning. Rows are not delimited.Contains long values.

Your help is appreciated.
Vino,
I believe you have given an example of your file structure in your first post. There, you have shown that the files are delimeted (separated) by comma. Please check whether this is the case for your actual data.
If possible send one row of actual data. We can troubleshoot further from there. I suspect your file contains different delimeter other than comma.

Have you clicked the "View data" button in the file stage? Where exactly is the warning showing?
Thanks,
~Arindam.
Post Reply