Staging into ODBC

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
mkolan
Participant
Posts: 3
Joined: Thu Nov 20, 2008 9:04 am

Staging into ODBC

Post by mkolan »

Hi
I'm new to datastage. I was using a tutorial to do some simple exercises to start with.
The situation is I was performing ETL from a flat file Which had the date,
transformed the data into day,month,quarter and year. The target is to create a table in sql server for which i used ODBC stage.
When i performed the job it compiled with no errors but on running the job it load any rows on all stages.
When viewed the data on ODBC the following error displayed:

Invalid object name '(the name i gave for the table to be created)'

What could be the possible error?

Thanks
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Post by mavrick21 »

My two cents

Does the target table exist and has select/insert privileges for the user running the DataStage job?

If you want to create a table in ODBC stage then does the user have create permission on the target database?

Does the ODBC connection work fine? After you created ODBC connection did you Test the connection?
mkolan
Participant
Posts: 3
Joined: Thu Nov 20, 2008 9:04 am

Post by mkolan »

Yes, The user that i used has the DDL and DML privilages.
I did check the connectivity too.
The target table was created without any values.

The primary key mismatch, Appreciate your reply. :)

Is the function "Right(TAG.TO.MONTH(Input),2)","TAG.TO.QUARTER(Input)","TAG.TO.YEAR(input)" predifined with default or is it a plug-in? I was unable to find them.
mkolan
Participant
Posts: 3
Joined: Thu Nov 20, 2008 9:04 am

Post by mkolan »

Situation:
A simple flat file without transforming has to be loaded into a sql server though an odbc stage. When performed the run, The flat file rows are transformed but at the ODBC stage, The input shows the error
"metadata mismatch where actual=2 given 0" and then "Datasource empty!"
I'm not performaing any tranformation, Even though i tried swapping the that column with scale 2 as the primary key was a decimal.The metadata is similar for both. What could be the possible problem?
greggknight
Premium Member
Premium Member
Posts: 120
Joined: Thu Oct 28, 2004 4:24 pm

Post by greggknight »

First if the table is being created on the right server in the correct database with the create table option in the ODBC being used then your connection is good. But looking at your error It says the object cannot be found. This gets me thinking that you are not defining the database in your connection string.
If your DSN uses master as the default database then you need to use the fully qualified name when refrencing the table. Otherwise change you DSN to use the database you want as the default.

Thats where I would start.
"Don't let the bull between you and the fence"

Thanks
Gregg J Knight

"Never Never Never Quit"
Winston Churchill
Post Reply