Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    11

    Unanswered: 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

  2. #2
    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?

  3. #3
    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

  4. #4
    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]

    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.
    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.
    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?
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •