TD studio does not reflect DDL changes.

Teradata Studio
Enthusiast

TD studio does not reflect DDL changes.

I have a view with 4 columns.  If I select * from the view, I see all 4 columns.

If I remove a column from the view and replace it, then select *, I should see 3 columns.  I still see 4.

If I log into the DB using BTEQ, my changes are reflected.

If I close and re-open Teradata Studio, my changes are reflected.

This looks like a cacheing issue.  I've searched the help for that, but I haven't found anything relevant.  Is there a way to fix this behaviour?

7 REPLIES
Teradata Employee

Re: TD studio does not reflect DDL changes.

You need to Refresh the Views folder so that the view is refreshed.

Enthusiast

Re: TD studio does not reflect DDL changes.

Thanks for the quick reply.  I hadn't thought of that.  Here's what I found:

  1. Hitting refresh on the views folder didn't work.
  2. If it did, this would still be poor behavior.  If I replace a view, the tool should go to the DB and query the view, not some cache.  The refresh trick would be a good workaround, but it amounts to a secret trick.
  3. Just for fun, I confirmed the same behaviour occurs with tables.
  4. FYI, my account is set to get email notifications when a post has been responded to.  I'm not getting those (checked my spam folder).  Is there a way to be notified?

Forgot to include this:

Teradata Studio

Version: 14.02.0.201302060329

Teradata Employee

Re: TD studio does not reflect DDL changes.

If you run SQL from the SQL Editor, the Data Source Explorer does not get notified that an object has changed, thus you will need to do a manual Refresh. If you use one of our Studio dialogs to create or modify an object, than we will automatically refresh the folder in the Data Source Explorer.

One issue may be the Result Set window thinks the same query is run. Close the window and should resolve the problem. An attempt is made to reuse Result Set windows to save space.

Enthusiast

Re: TD studio does not reflect DDL changes.

I agree that cacheing has great potential to increase performance and decrease load... UNLESS it doesn't work.  Then cacheing is a liability.  There is no defending a defective cache.  As far as I can tell, the only way to get Teradata Studio to reflect the proper state of the DB is to close and open it.  I now have that wisdom, but others will lose time. I have seen new TD clients get very mad about this behavior.

When Teradata Studio sees the words "Replace, Drop, Create" etc, it should purge the cache.

I think a great feature would be an option to disable cacheing so Teradata Studio functions more like BTEQ, where what you see is what's on the DB.  No closing windows, right-clicking, etc.

Is there a way to make a feature request, or are these forums scanned?

Teradata Employee

Re: TD studio does not reflect DDL changes.

You do not need to close and reopen Studio but simply do a "Refresh" of the folder in the Data Source Explorer (DSE), if you have created objects by entering the DDL in the SQL Editor. If you create the objects using the DSE dialogs, than the refresh is done automatically. Again, if you run the Drop, Replace, or Create Dialog from the DSE menu options. instead of entering the DDL in the SQL Editor, the refresh is automatically done for you. 

Enthusiast

Re: TD studio does not reflect DDL changes.

i dont know why the DDl changes do not get quickly updated?? is there any problem related to the site or not

Teradata Employee

Re: TD studio does not reflect DDL changes.

Again, When you create objects by entering the SQL into the SQL Editor, the Data Source Explorer does not know about the object until you refresh the folder. At that time, we read the metadata stored in Teradata to create the objects in the Data Source Explorer tree.