Exporting Metadata¶
The DESC VQL DATABASE statement exports all the metadata
from a Virtual DataPort database or from the entire Server. This is very
useful for backup and migration purposes.
The syntax of the statement is:
DESC VQL DATABASE [ <database_name> ]
(
'<property name>' = { 'yes' | 'no' }
[ ,'<property name>' = { 'yes' | 'no' } ]*
)
If the DESC VQL DATABASE statement includes the parameter
<database_name>, all the metadata from that database will be
exported. It will not include the metadata of user definitions and
their privileges.
If the DESC VQL DATABASE statement does not include the
parameter <database_name>, the entire Server’s metadata will be
exported. That is:
The metadata from the entire Server, along with their
CREATE DATABASEstatements.User definitions and privileges.
Server settings
…
The user that executes this statement needs administrator privileges.
The configuration parameters (<property name>) of this command are:
includeCreateDatabase. Ifyesand you are exporting a database, the output will include aCREATE DATABASEstatement to create the database that you are exporting.includeJars. Ifyes, the output will include the jars that contain the Java classes associated with extensions. The section Developing Extensions of the Developer Guide explains what these extensions are and how to develop them.includeEnvSpecificElementsandincludeNonEnvSpecificElements. Use these options to obtain only the VQL statements of the elements that depend on the environment ('includeEnvSpecificElements' = 'yes'), or the statements of the elements that are independent of the environment ('includeNonEnvSpecificElements' = 'yes')For example, if a user has created new views and wants to obtain their VQL statements without the VQL of the elements that depend on the environment (e.g. data sources), she has to use the following options:
('includeNonEnvSpecificElements' = 'yes', 'includeEnvSpecificElements' = 'no').The section Exporting Environment-Dependent and Independent Elements to Different Files of the Administration Guide lists which elements are considered dependent on the environment and which are considered independent.
Note
These two options are deprecated and may be removed in future versions of the Denodo Platform. Use the includeProperties option instead.
includeScanners. Ifyes, creation statements of the WWW wrappers will contain the binary files of the ITPilot scanners used by these wrappers.includeStatistics. Ifyes, the output will include the statistics gathered for the view. These are the statistics that are used during the cost-based optimization process. See more about this in the section Cost-Based Optimization of the Administration Guide.includeCustomComponents. Ifyes, the output file will include the ITPilot custom components used by the existing WWW data sources.dropElements. Ifno, the result will not include aDROPsentence before eachCREATEone. If yes, the output file will include a commandDROP…CASCADEbefore each commandCREATE.For example:
DROP DATASOURCE JDBC IF EXISTS internet_ds CASCADE; CREATE DATASOURCE JDBC internet_ds...
The
DROP...CASCADEsentence deletes the data sourceinternet_dsand all the views that depend on it. This option is useful when we want to make sure that the imported data sources do not have more views that the ones contained in the VQL file.replaceExistingElements. Ifno, the result will return aCREATE OR REPLACE...for each element, instead of justCREATE...Ifyes, the output file will not includeDROPstatements. JustCREATE OR REPLACE.For example:
CREATE OR REPLACE DATASOURCE JDBC internet_ds...In this case, the Server that imports this file, will replace the JDBC data sourceinternet_ds. But, as it does not include the sentenceDROP ... CASCADE, it will not delete the views that depend on this data source.
For metadata backup and migration purposes, there also exists the
DESC VQL WRAPPER ITP statement. This statement exports only the
metadata of the ITPilot wrappers of the active database. It is useful
for ITPilot server backups or for migrations of ITPilot wrappers from a
Virtual DataPort installation to an ITPilot installation. Please see the
ITPilot documentation for more information about this type of wrappers.
To use this statement is necessary to be connected to the database which
WWW wrappers are to be exported before executing the statements.
The DESC VQL WRAPPER ITP statement also allows to specify a
value for the includescanners property.
Example: the following statement exports a database named DB. The WWW wrappers container in DB will be exported, including the binary files required to regenerate the scanners that make use of them.
DESC VQL DATABASE DB ('INCLUDESCANNERS' = 'YES')
