Statements to Work with GIT¶
This section describes the command required to work with GIT.
Note
We do not recommend using VCS-related commands manually or through CI/CD processes, as these are commands designed to be used by the Administration Tool and the Design Studio.
To modify programmatically the VCS configuration of a Denodo database, check the section Creating and Modifying Virtual DataPort Databases.
DVCSCOMMIT¶
DVCSCOMMIT
checks the specified element into the version control
repository, along with the dependencies of the element that have been
modified.
DVCSCOMMIT <element-path:literal> [ LOGMESSAGE <log-message:literal> ]
Optionally, you can add a message to the commit in the LOGMESSAGE
clause.
DVCSPUSH¶
DVCSPUSH
transfers the commits of a database from your local
repository to the remote repository.
DVCSPUSH <database_name:literal>
DVCSPULL¶
DVCSPULL
merges the commits to a database, on the remote repository
into your local repository.
DVCSPULL <database_name:literal>
DVCSREVERT¶
DVCSREVERT
resets the local repository of a database to a specific
commit. To do so, it reverts each commit, starting from the last one,
until it reaches the selected commit.
DVCSREVERT <database name:literal> <commit id:literal>
VCSCONTENTS¶
VCSCONTENTS
returns the elements or the actual files contained in a
database or folder of the configured version control repository. It can
also be used to obtain a list of the databases contained in the
repository.
VCSCONTENTS { <element path:literal> [ FILES ] | LIST DATABASES }
Using the FILES
clause will show a list of actual files
instead of VDP elements.
VCSCONTENTS LIST DATABASES
stores a list of the databases contained
in the repository.
VCSSHOW¶
VCSSHOW
returns the VQL of a local element and the VQL of that same
element that is stored in the VCS server. It only works for elements
under version control.
VCSSHOW <path:literal> [ REVISION <revision:literal> ]
[ WITH_DEPENDENCIES ]
For example,
VCSSHOW '/databases/customer360/views/p_view1' WITH_DEPENDENCIES
When obtaining the remote version of an element, a revision can be
specified with the REVISION
clause (see REVISIONS).
By adding WITH_DEPENDENCIES
, VCSSHOW
returns the elements on
which this element depends.
REVISIONS¶
REVISIONS
returns a list of existing revisions for the specified
element.
REVISIONS <path:literal>
GET_REVISION¶
The GET_REVISION
statement returns the VQL statements to create the elements that have been added,
modified, and deleted between two commits. If the ‘TO’ hash is not
specified, it defaults to ‘HEAD’. You can also choose to include privileges
and server configuration properties in the generated VQL.
GET_REVISION FROM '<from_hash>'
[TO '<to_hash>']
[FOR DATABASES (<db_1>,"<db n>")]
[ ( <GET_REVISION parameter> [, <GET_REVISION parameter> ]* ) ]
FROM '<from_hash>'
: Specifies the starting commit hash or tag.TO '<to_hash>'
(Optional): Specifies the ending commit hash or tag (defaults to ‘HEAD’).FOR DATABASES
(Optional): Specifies the scope of database elements included in revision (defaults to all databases).GET_REVISION parameter
(Optional): Specifies the parameters to include in the generated VQL. The available parameters are: -'includeuserprivileges'
: Includes privileges in the generated VQL. -'includeserverproperties'
: Includes server properties in generated VQL. -'includeproperties'
: Used with export script. It generates a properties files with properties variables used in this environment. It can be helpful during deploys in a CI/CD flow, if you want to create new elements with properties and deploy this revision using SM. -'exclude_jdbc_wrapper_properties'
: If you want the parameters CATALOGNAME and SCHEMANAME of the CREATE WRAPPER JDBC statements to contain the actual value instead of a property. Default value: no.
Note
If you use Export script to generate properties files, you can use the option -mp to specify a custom password for exporting the properties file. This can be useful if you want to import this VQLs in a different environment with a different keystore.
For example,
GET_REVISION FROM 'c80d1dfa86012f1401d1eb1ade7242e67db281b1' TO 'HEAD'
FOR DATABASES (database1, "database 2")
( 'includeuserprivileges' = 'yes', 'includeproperties' = 'no' )
GET_REVISION FROM 'c80d1dfa86012f1401d1eb1ade7242e67db281b1'
UNRESOLVED_ELEMENT¶
There are three types of unresolved elements statements:
ALTER UNRESOLVED_ELEMENT
: This statement is used to modify the VQL of an unresolved element. For example,ALTER UNRESOLVED_ELEMENT v4_view VQL 'CREATE OR REPLACE VIEW v4 AS SELECT * FROM wrong_view';
EXECUTE UNRESOLVED_ELEMENT
: This statement is used to run VQL of an unresolved element in order to import it. For example,EXECUTE UNRESOLVED_ELEMENT v4_view;
DESC UNRESOLVED_ELEMENT
: This statement is used to see the information of an unresolved element in order to import it. For example,DESC UNRESOLVED_ELEMENT v4_view;