Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting table definitions...

Status
Not open for further replies.

eyetry

Programmer
Oct 2, 2002
560
US
During the development phase of a project I'll be incorporating DB tables that are being designed by another group. Doesn't look like I can use the DB Designer to extract definitions.

I want to automate building a .ctl file for bulk loads.

Anyone have an idea as to how I can use a map to extract the defs?

eyetry
 
In database design you can always create a tree of the table
assuming you can connect to the database. Why not ask the person who created the tables in the first place?

 
Getting the DB Designer to create trees from a table isn't the issue. Also, because we are in an early development phase the tables will be changing over the next few months.

My objective is to produce a file that describes 1:S table(s). It looks like I'll need to create a script that a map will execute. I had hoped to extract the definition from a rule or point to the mdq file containing the 'describe table' command as input.

The description will be used for various purposes. One is as part of a bulkload process, another is to alert me when a table or tables have changed, another is to automagically rebuild certain scripts whenever a table related tree changes. Of course there are a few other benefits I'll derive as well.

eyetry
 
How would you get an MDQ without using the DID? You could create the trees manually, but depending on the description of the table and the number and type of columns, that is a LOT of work. If the table(s0 will be changing, then this product is not the tool you should be using. Not sure what the purpose of your project is, but based on your description, it doesn't look favorable. Notes: There is no way to use DS TX to tell you when a table has changed.
Bulkloading is better handled by DataStage.

BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
I resolved this by creating an map that executes a script that builds files containing table descriptions. Once the description files are created an autmated system compares them to the last known version of each table. If they are the same nothing else occurs. Otherwise the next process is kicked off...

1. Email is generated stating that the trees need to be rebuilt from the DB Interface Designer and related maps need to be updated.

2. Uses new definition files to build additional scripts that handle specific items happening outside maps, like batch, SQL, Control, Log and certain backup files.

My original intent was to try to use the DBID more and do as much as possible in my maps but it doesn't look like that will be possible. This will work too.

Its an adventure no matter the path.

eyetry

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top