You can translate the question and the replies:

VQL for updating the Base View

Hi, I know we can detect the changes in the underlying data source using GET_SOURCE_CHANGES and GET_VIEWS stored procedures. However, once we detect the changes, is there any way to refresh the base view (VQL commands?) once we detect the changes?
17-09-2020 08:19:21 -0400

3 Answers

Hi, I would refresh the base view grahically by using the **“Source Refresh”** option available on the “Edit” tab of the base view in the Virtual Dataport Administration tool to reflect the changes in the underlying data source. In order to refresh the base view, I would do the steps mentioned below: * Double click on the view which needs to be refreshed. * Click the '**Edit**' tab and click on '**Source Refresh**'. Now the changes in the underlying data source will be reflected in the base view. As of now, this is the only option available to propogate the changes into base view. For more information, you can have a look at the document [Source Refresh]( of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
18-09-2020 04:23:33 -0400
Hi, I know we can refresh by clicking on 'Source Refresh' but I was looking for a programmatic way to do it? If there is no existing command, then can I add the columns in base view that have been added in data source by modifying the base view somehow (Alter Table perhaps?). Or if none of the above is possible, can we delete and create the base view again programmatically with same name while not deleting the depedent views? Is this possible? and will it update the dependent views with new columns added in base view as well?
18-09-2020 04:31:27 -0400
Hi, If you have made changes to your underlying schema by adding new fields, you can click on the **‘Source refresh’** button to bring in the new columns to your base view. In general, Source refresh will sync the base view with the data source. As of now, this is the only way to perform the actual source refresh. Besides,we have a [REFRESH statement]( to refresh the data of a view. This command updates the data of the underlying data source. But it is supported only by the base views created using the [CREATE_REMOTE_TABLE]( stored procedure. In order to add new columns, I would use the Create or Replace table statement. For instance, if I have three fields and want to add a fourth field, then I will include the additional column in the Create Or Replace statement. You can have a look at the section [Creating a Base View]( of the Virtual DataPort VQL Guide for more information. And also, I would like to add that deleting a base view that has dependent views, deletes the dependent views automatically. However, if you delete a base view that is used in an interface view, that interface is not deleted automatically because only the implementation has been removed. Hope this helps!
Denodo Team
24-09-2020 06:38:12 -0400
You must sign in to add an answer. If you do not have an account, you can register here