DATA Step, Macro, Functions and more

loading dynamic file data into teradata

Reply
Contributor
Posts: 35

loading dynamic file data into teradata

Hi All,

 

I need to load the data from attached files into database table,the no. of columns and colum,n names keep on changing. Is there any way we can read the columns after importing and creating database table based on the input.

 

Because it is recurring process want to automate it rather than working on each time the file we received.

 

Let me know the process to read database table and assigning the index(I want S3544 column to be index instead of 1st column not sure how to put that as index because column name is changing.)

 

Thanks all in advance.

Super User
Posts: 10,487

Re: loading dynamic file data into teradata


sasg wrote:

Hi All,

 

I need to load the data from attached files into database table,the no. of columns and colum,n names keep on changing. Is there any way we can read the columns after importing and creating database table based on the input.

 

 


The highlighted text violates several rules of formal database design.

If this stuff is supposed to end up in a single table tell whoever is responsible for this project that the programming costs, which will occur everytime the incoming file layout changes is likely to become noticeable. I have dealt with this in past as a contractor and had to explain to project staff from a very large well-known computer related firm that changing file layouts and contents had a cost in man hours for manipulating the data before we could get the pieces into a standard database.

 

If there are Common elements that do not change it may be possible to select those and upload them in a consistent manner. May. But it is still going to have a cost in person time every time the file changes.

 

I can't trust Excel files from unknown sources so can't look at your data. Note that if Excel is the actual data transfer mechanism you may also have issues with variable types changing from numeric to character and similar. It gets even worse with databases that specify numerics as different "sizes". If the initial data indicates a field is integer and later you get decimal values or possibly longer integer than expected issues will arise.

 

There should be a formal agreement as to what the file layouts and contents will be before ever starting such a project.

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 275 views
  • 0 likes
  • 2 in conversation