Quote Missing in Output file

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
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Quote Missing in Output file

Post by Roopanwita »

Hi,

I am creating CSV files from table and in ,
Job desig is like Table --> transformer (used for datatype conversion as I changed all output to varchar).

From Source I have datatype like : Varchar, Decimal and Date .

I want output records with quote , like "A"."12","01/01/2013'."B". To achieve this in Sequential file

Input--> Fomat --> Field Default --> Quote --> double ( I have set this propery)

In output file (when I open in notepad/textpad) , I see quote for those fields onlt those are Varchar and date and Date.

Like "A".12,"01/01/2013'."B".
Whereever I have used DecimalToString conversion function ,quote is missing there.


Is there anyway I van get quote for all fields in output CSV file.

Thanks for reply
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That is correct under the CSV "standard" specified by Microsoft; numeric values are not quoted. To achieve it, simply change the data type to VarChar.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Thank you for response.

In source I have data type as float, in transformer I used decimaltoString function and converted to varchar.In target it is varchar only ,still it is not getting quote. Please let me know if there is any solution .

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

All VarChar data types should be quoted by default. Can you open the extended properties of that particular column and see whether there is anything there that might change the default? You might also be able to see it in the record schema.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Thank you for response. It is working now by setting quote from extended property.

When I open extended property, for the column I used datatype conversion to float was missing. After I added quote over there it is working.

Thank you for solution.
Post Reply