INSERT query of view column data types

Database

INSERT query of view column data types

I know that Dieter and others talked about how to identify the data type of a view in the thread http://forums.teradata.com/forum/database/query-to-find-out-the-table-name-and-the-columns-of-that-t....

However, I'm trying to write a query that will insert this metadata into a table that I'll use to populate our internally developed metadata repository.  Is there ANY way to query DBC to get the same data provided by the HELP COLUMN command?

Thanks in advance for any suggestions,

Nolan

2 REPLIES
N/A

Re: INSERT query of view column data types

Hi Nolan,

you can try to resolve the view down to the base table, e.g. 

http://developer.teradata.com/blog/ulrich/2011/11/extract-and-analyse-database-object-dependencies

but this is a huge overhead (product joins) and it might return false positives when an existing table name is used as an alias in another view. Additionally there's no way to include tables used in Stored Procedures.

Did you consider using the existing metadata repository, Teradata's Metadata Services (MDS), instead of developing your own solution?

Dieter

Re: INSERT query of view column data types

Thanks for the suggestions. 

The decision to not use MDS was made way over my pay-grade many years ago.

Nolan