VARCHAR to BigInt

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
shave
Participant
Posts: 15
Joined: Thu Mar 15, 2007 1:31 am

VARCHAR to BigInt

Post by shave »

Hello

I am reading a csv file into a sequential file stage and loading it into a ODBC stage using a transformer. All datatypes in Sequential File are converted to varchar.. where as in my ODBC stage I have Bigint, char,date datatypes.

Please do let me know what functions I need to use to convert varchar to BigInt and How?
Last edited by shave on Fri Jun 27, 2008 12:23 am, edited 1 time in total.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

How can you ever do this :roll: "loading it into a ODBC stage using a transformer" ?? :roll: i assume it would be some database. which one ?
shave
Participant
Posts: 15
Joined: Thu Mar 15, 2007 1:31 am

Post by shave »

My target is DB2 database. But I am trying to load it using ODBC Stage.. Please let me know how can I do it using Transformer or Modify Stage
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Post by sreddy »

Shave


After reading i understand you can view your data present Varchar data type. All your source CSV data is in Integer or number right.

Try to cover all your source column data types in to as per the Target types and try to view the data.


shave wrote:My target is DB2 database. But I am trying to load it using ODBC Stage.. Please let me know how can I do it using Transformer or Modify Stage
SReddy
dwpractices@gmail.com
Analyzing Performance
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Many conversions from VarChar() to other types, particularly numeric ones, can be done implicitly. You will need to use the StringToDate() function for the date conversion if your job uses transform stages, otherwise the modify stage does conversions as well, but uses other function names and a different syntax.
Post Reply