If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Working with Files

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-18-04, 14:02
vootkur vootkur is offline
Registered User
 
Join Date: Jun 2004
Posts: 11
Working with Files

I will be getting files with fixed width format.
I need to automate the process by writing shell scripts to load the data
into the database tables.
My problem starts here i dont know to which table these files should be loaded,
for this i have to get the file stucture from the database repository
and compare both the file structure and load the data into that corresponding Table

Any help would be greatly appreciated.
Thanks
vootkur
Reply With Quote
  #2 (permalink)  
Old 06-18-04, 14:22
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
sounds like you have your work cut out for you to investigate.

what's the actual question?
Reply With Quote
  #3 (permalink)  
Old 06-18-04, 14:48
vootkur vootkur is offline
Registered User
 
Join Date: Jun 2004
Posts: 11
working with files

Let me Explain u in Detail;
I need to load the data from Db2 to Teradata.
For this i will be getting Fixed Width Format files from Db2 with header(like columns names).
The files will be Fixed Width.
Using these files i need to automate the process of loading the data into Teradata Tables using Shell Scripts.
I need to remove the header and load the data.
The problem is how do i know to which Table the data should be loaded seeing the file.
For this,we need to compare the file structure with the file structure in the database repository and load the data.
i am just wondering is this a feasible solution and whether this can be done.FYI-the database is loaded on the unix server.
Thanks
vootkur
Reply With Quote
  #4 (permalink)  
Old 06-18-04, 15:04
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
Quote:
Originally Posted by vootkur
Let me Explain u in Detail;
I need to load the data from Db2 to Teradata.
For this i will be getting Fixed Width Format files from Db2 with header(like columns names).
The files will be Fixed Width.
"Fixed width" or "field based/delimited" field files?
[quote]

Quote:
Using these files i need to automate the process of loading the data into Teradata Tables using Shell Scripts.
I don't know what Teradata is - I presume it's some kind of a DB.
What tools do you have in Teradata for loading ascii data?
For example, for loading ascii data into Oracle there is sqlldr.
You need to investogate that.
Quote:
I need to remove the header and load the data.
The problem is how do i know to which Table the data should be loaded seeing the file.
You have either to investigate that yourself - I don't know neither Teradata nor the actual DB schema you're using.
Also as a hint, the header lines in your data might be used to 'derive' the field names in Teradata schema and/or the corresponding tables as well. Meaning relating the Db schema names to the Teradata fields.
Quote:
For this,we need to compare the file structure with the file structure in the database repository and load the data.
I don't understand what that means. Can you elaborate, pls?
Quote:
i am just wondering is this a feasible solution and whether this can be done.FYI-the database is loaded on the unix server.
Thanks
vootkur
yes, it's feasible, but you need to do a bit more investigation on your own finding out the details of your INPUT and the desired OUTPUT parameters/actions/schemas. You also need to know what tools Db2/Teradata you have at your disposal.
I've done something similar awhile back with Oracle.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On