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:

Syntax of the DESC VQL DATABASE statement to export a database
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 DATABASE statements.
  • 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. If yes and you are exporting a database, the output will include a CREATE DATABASE statement to create the database that you are exporting.

  • includeJars. If yes, 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.

  • includeEnvSpecificElements and includeNonEnvSpecificElements. 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.


    These two options are deprecated and may be removed in future versions of the Denodo Platform. Use the includeProperties option instead.

  • includeScanners. If yes, creation statements of the WWW wrappers will contain the binary files of the ITPilot scanners used by these wrappers.

  • includeStatistics. If yes, 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. If yes, the output file will include the ITPilot custom components used by the existing WWW data sources.

  • dropElements. If no, the result will not include a DROP sentence before each CREATE one. If yes, the output file will include a command DROPCASCADE before each command CREATE.

    For example:

    CREATE DATASOURCE JDBC internet_ds...

    The DROP...CASCADE sentence deletes the data source internet_ds and 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. If no, the result will return a CREATE OR REPLACE... for each element, instead of just CREATE... If yes, the output file will not include DROP statements. Just CREATE 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 source internet_ds. But, as it does not include the sentence DROP ... 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.