put data from oracle table to flat 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
bkar
Participant
Posts: 14
Joined: Thu May 19, 2011 7:19 am

put data from oracle table to flat file

Post by bkar »

Hi,

I'm a new user, I need to put all the of a table to a flat file. Please help me in this. let me know which stage to use and which properties to be used. A detailed description is required. It would be great If any one can help me with a training material which describes how to do it.
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Read the documentation that comes along with the tools.

A) Import table definitions.
B) create a Parallel canvas job.

Within the job use the Oracle Connector and a sequential file stage.

Load the Oracle Connector with the table definition you imported.

Create one job per table you with to import.

Create one Output (sequential) file per table you imported.

Re-read the documentation because you'll need to know a lot more than the above to get your jobs written, compiled, and deployed.

Are you the only developper in your shop? Ask for some help from your peers.
bkar
Participant
Posts: 14
Joined: Thu May 19, 2011 7:19 am

Post by bkar »

Thanks a lot. I'm alone here to work on datastage and I have used different ETL tool before.

I have imported the table and linked it to a sequential file. When I'm trying to compile it is throwing error "property select statement is required"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have neither provided, nor asked DataStage to generate, the SELECT statement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkar
Participant
Posts: 14
Joined: Thu May 19, 2011 7:19 am

Post by bkar »

How I need to provide that
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If "Generate SQL" property value is "No" then you provide a compliant (one that matches the information on the Columns tab) SELECT statement in the "SELECT Statement" property. If "Generate SQL" property value is "Yes" then you provide the table name in the "Table name" property, which becomes the FROM clause, and the column names on the Columns tab become the SELECT clause.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Poornimayvs
Participant
Posts: 5
Joined: Fri Apr 08, 2011 9:32 am

Post by Poornimayvs »

Hi,

You can also give the table name directly by select the read mode as Table. So they would not be any need of giving the select statement or generate query. This would work if you want to read all the columns from that table. But if you need to select few columns then you need to go for select statement.

Thanks.
bkar
Participant
Posts: 14
Joined: Thu May 19, 2011 7:19 am

Post by bkar »

Thanks a lot for your replies. It got resolved now.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

And FYI: You will want the job called from a Sequencer.
bkar
Participant
Posts: 14
Joined: Thu May 19, 2011 7:19 am

Post by bkar »

I have specified the select statement in properties
Post Reply