How to import files w out editing, for tbl defs
Posted: Wed Feb 04, 2004 10:22 pm
of course you could just do a quick awk/sed on your descriptor file and
then import.
Bob Barnett - PA wrote:
>Question :
>
>In attempting to import column names from a text file to create colm names
>in a tanle definition, in DS manager.
>
>
>
>Desired result :
>
>Get extensive number of column names for a large file into DS Manager Table
>Definitions so it can be downloaded to an input file in a DS job.
>
>without having to manipulate the text file to delete spaces and descriptive
>verbage next to the filed names.
>
>Question :
>
>What's the best, or workable method?
>
>
>
>
>
>We did find out that there must be 1 data row in a file w column names as
>the first row to import, in order to create column names for a table def.
>
>BUT
>
>We still have some files w up to 300 field names.
>
>That's a lot of typing and manipulating our control files.
>
>
>
>We have control text files like this :
>
> (AMOUNT DECIMAL EXTERNAL,
>
> AMOUNT_POC DECIMAL EXTERNAL,
>
> APPLICATION# DECIMAL EXTERNAL,
>
> BUYER DECIMAL EXTERNAL,
>
> ......
>
> --------
>
> etc.
>
>
>
>So we'd have to manually edit it, deleting spaces and descriptive data to
>look like this :
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>
>
>Then add a row of data so the final result that gets imported is this :
>
>
>
>
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>0,0,1201039,0,1,1,Loan Origination Fee, .... etc
>
>
>
>Unfortunately we will not have reliable related tables that we can more
>easily load column names from.
>
>Data stage seems to require a row of data under the column title row in the
>imported file, so it can be accessed w the first row is column names
>function.
>
>
>
>It seems there must be a way in DS to import the field names in the format
>at the top here, without having to edit out the descriptive data.
>
>Help appreciated.
>
>
>
>bob
>
>
>
>
>
>_______________________________________________
>datastage-users mailing list
>datastage-users@oliver.com
>http://www.oliver.com/mailman/listinfo/datastage-users
>
>
>
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users
then import.
Bob Barnett - PA wrote:
>Question :
>
>In attempting to import column names from a text file to create colm names
>in a tanle definition, in DS manager.
>
>
>
>Desired result :
>
>Get extensive number of column names for a large file into DS Manager Table
>Definitions so it can be downloaded to an input file in a DS job.
>
>without having to manipulate the text file to delete spaces and descriptive
>verbage next to the filed names.
>
>Question :
>
>What's the best, or workable method?
>
>
>
>
>
>We did find out that there must be 1 data row in a file w column names as
>the first row to import, in order to create column names for a table def.
>
>BUT
>
>We still have some files w up to 300 field names.
>
>That's a lot of typing and manipulating our control files.
>
>
>
>We have control text files like this :
>
> (AMOUNT DECIMAL EXTERNAL,
>
> AMOUNT_POC DECIMAL EXTERNAL,
>
> APPLICATION# DECIMAL EXTERNAL,
>
> BUYER DECIMAL EXTERNAL,
>
> ......
>
> --------
>
> etc.
>
>
>
>So we'd have to manually edit it, deleting spaces and descriptive data to
>look like this :
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>
>
>Then add a row of data so the final result that gets imported is this :
>
>
>
>
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>0,0,1201039,0,1,1,Loan Origination Fee, .... etc
>
>
>
>Unfortunately we will not have reliable related tables that we can more
>easily load column names from.
>
>Data stage seems to require a row of data under the column title row in the
>imported file, so it can be accessed w the first row is column names
>function.
>
>
>
>It seems there must be a way in DS to import the field names in the format
>at the top here, without having to edit out the descriptive data.
>
>Help appreciated.
>
>
>
>bob
>
>
>
>
>
>_______________________________________________
>datastage-users mailing list
>datastage-users@oliver.com
>http://www.oliver.com/mailman/listinfo/datastage-users
>
>
>
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users