Bulk load

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
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Bulk load

Post by 47shailesh »

i have designed a job in DS using 2 OCI and a transformer.

Source OCI does SELECT 1 FROM DUAL and has a dummy column named "Dummy"

Target OCI has a Insert SQL that does the bulk insert in target table.

I used Dummy column as i do no want to use OraBulk stage as it wud'nt serve my purpose i.e. i have to test the bulk insert of DS vs Oracle frm backend.

Now problem is that when i execute the job DS gives error

"ORA-01036: illegal variable name/number" any hint where i go wrong
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

OCI stage will not allow you to perform bulk loads as this option is not there in the OCI stage. Only with the ORA Bulk stage, which leverages the database's bulk load utility.
As for your error, search on the ORA code in google.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to explain how you are doing a 'bulk load' from an OCI stage. I also don't understand why the true Bulk Loader stage wouldn't "serve your purpose"? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

chulett wrote:You might want to explain how you are doing a 'bulk load' from an OCI stage. I also don't understand why the true Bulk Loader stage wouldn't "serve your purpose"? :?
sir i have a insert query in the Target OCI, that does the bulk insert.
i want to load data on condition say for 2 years only even if i have 10 years data in my DB.

when i fire that insert query in the Oracle it take 30 sec to fetch the data.

Same thing i want to check how much time the same query will take if it runs through DS.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

An insert is a DML statement. It will be a logged activity. A bulk load is not the same as insert.
So you want to test the inserts. Take the same sets of data and test it out. It does not depend upon how many years of data you have. It depends upon a lot of factors like record byte size, netword traffic, constraints, triggers, indices etc etc.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

DSguru2B wrote:An insert is a DML statement. It will be a logged activity. A bulk load is not the same as insert.
So you want to test the inserts. Take the same sets of data and test it out. It does not depend upon how many years of data you have. It depends upon a lot of factors like record byte size, netword traffic, constraints, triggers, indices etc etc.
Agreed what you said. But my prob is i using a dummy column in both the Target and Source OCI but not using it anywhere in the insert query.. that's y there is an error in Executing the job. Is there any way to avoid that.

I want the whole Insert Query to be in the target OCI rest design can be anything which you people suggest.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

47shailesh wrote:
DSguru2B wrote:An insert is a DML statement. It will be a logged activity. A bulk load is not the same as insert.
So you want to test the inserts. Take the same sets of data and test it out. It does not depend upon how many years of data you have. It depends upon a lot of factors like record byte size, netword traffic, constraints, triggers, indices etc etc.
Agreed what you said. But my prob is i using a dummy column in both the Target and Source OCI but not using it anywhere in the insert query.. that's y there is an error in Executing the job. Is there any way to avoid that.

I want the whole Insert Query to be in the target OCI rest design can be anything which you people suggest.
why not drop the dummy by adding a transformer before bulk loading?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Start over. Please supply the following:
- Source metadata
- Source sql
- Target metadata
- Target sql
- Job Design.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

DSguru2B wrote:Start over. Please supply the following:
- Source metadata
- Source sql
- Target metadata
- Target sql
- Job Design.
Source- ORA OCI one column -> DUMMY <type varchar>
Source sql - SELECT 1 FROM DUAL
Transformer doing no transformation
Target - ORA OCI one column -> DUMMY <type varchar>
Target SQL - Insert /*+ append*/ into <column name> from view

There is nothing more to describe in job design
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I bet the error message is for the target stage. What is the column you have defined in the target OCI stage? Does that table exist in the database? Does it have the column you are using? Are you using user defined sql in the target stage or generated, if generated then what is your update action?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

47shailesh wrote:Target SQL - Insert /*+ append*/ into <column name> from view

There is nothing more to describe in job design
Sure there is. Can we get a little more precise in our description of the target SQL, espcially seeing as how that's where the problem lies? :?

You don't insert without selecting from somewhere. And you don't insert into a 'column name'. You really should have posted the complete sql, however I would bet your problem is the fact that you haven't bound your 'dummy' column into your sql somewhere. And you must bind them or the OCI interface gets all kinds of upset.

If your column plays no role in the DML, just add it to your where clause such that it equates to 'true'. For example, declare it as a numeric field, mark it as a Key, set it to a value of 1 in the transformer and add to your where clause this:

Code: Select all

AND :1 = 1
Which will end up as "AND 1=1" after the bind variable is... bound, satisfying the OCI stage and not affecting your query. Other than to make it work, that is.
-craig

"You can never have too many knives" -- Logan Nine Fingers
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

chulett wrote:
47shailesh wrote:Target SQL - Insert /*+ append*/ into <column name> from view

There is nothing more to describe in job design
Sure there is. Can we get a little more precise in our description of the target SQL, espcially seeing as how that's where the problem lies? :?

You don't insert without selecting from somewhere. And you don't insert into a 'column name'. You really should have posted the complete sql, however I would bet your problem is the fact that you haven't bound your 'dummy' column into your sql somewhere. And you must bind them or the OCI interface gets all kinds of upset.

If your column plays no role in the DML, just add it to your where clause such that it equates to 'true'. For example, declare it as a numeric field, mark it as a Key, set it to a value of 1 in the transformer and add to your where clause this:

Code: Select all

AND :1 = 1
Which will end up as "AND 1=1" after the bind variable is... bound, satisfying the OCI stage and not affecting your query. Other than to make it work, that is.
i can't paste the whole sql query..

but still the query without column names look like this

INSERT /*+APPEND*/ INTO <target table name>
(<Columns>)
SELECT <Columns>
FROM (Select <columns>
FROM (select *
from<view name>
where <condition>))

group by <columns>)

DUMMY column is not used any where nor it is present in the DB.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

47shailesh wrote:DUMMY column is not used any where nor it is present in the DB.
Which is - as noted - more than likely your problem. Did you even try what I suggested? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

chulett wrote:
47shailesh wrote:DUMMY column is not used any where nor it is present in the DB.
Which is - as noted - more than likely your problem. Did you even try what I suggested? :?
thankx chulett for the previous solution, it worked unable to run the job immediatly after the reply due to some dependencies.. :D
Post Reply