Efficient way of copying rows and dropping columns

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jzijl
Participant
Posts: 23
Joined: Thu Jul 20, 2006 6:09 am

Efficient way of copying rows and dropping columns

Post by jzijl »

Hello,

We have build a DS Job using the Transformer. The only thing which is done is retrieving data from a database on a MSS SQL Server drop columns and rows and write the result in another database on a MSS SQL Server.

My question is whether there is a more efficient DS-Stage than the transformer as there is no transformation done.

Thanks in advance.

Jan
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Sure, just write a SQL script and have DS execute it.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why are you selecting those columns if you're only going to drop them? Don't select them in the first place!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jzijl
Participant
Posts: 23
Joined: Thu Jul 20, 2006 6:09 am

Post by jzijl »

The question was not complete. I needed the dropped columns (date valid from and to) to determine wether I could drop rows.

Thanks all,

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

Post by ray.wurlod »

Just put a parameterized WHERE clause in your extraction stage, on the Selection tab.
WHERE eff_date BETWEEN '#DateFrom#' AND '#DateTo#'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply