USER MANUALS

Tags

The Virtual DataPort allows you to assign tags to some of your elements.

CREATE TAG syntax

To create a tag use the statement CREATE TAG or CREATE TAGS.

Syntaxes of the CREATE TAG statements
CREATE [ OR REPLACE ] TAG <tag definition:tag>

CREATE [ OR REPLACE ] TAGS (<tag definition:tag> [, <tag definition:tag> ]*)

<tag definition> ::=
    <name:identifier>
    [ DESCRIPTION = <description:literal> ]
    [ <assignations> ]

<assignations> ::=
    ADD_TO (VIEWS (<view list:add_to_views>) COLUMNS (<column list:add_to_columns>))
    REMOVE_FROM (VIEWS (<view list:add_to_views>) COLUMNS (<column list:add_to_columns>))

<view list> ::=  [ <view identifier:view> [, <view identifier:view> ]* ]*

<column list> ::=  [ <column identifier:column> [, <column identifier:column> ]* ]*

<view identifier> ::= <database name:identifier>.<view name:identifier>

<column identifier> ::= <database:identifier>.<view:identifier>.<column name:identifier>

Examples.

  • Creating a tag:

    Creating a tag named ‘SSN’
    CREATE TAG "SSN"
       DESCRIPTION = 'Social Security Number';
    
  • Creating several tags with assignations:

    Creating two and assign them to a column and a view
    CREATE TAGS (
       "SSN"
           DESCRIPTION = 'Social Security Number'
           ADD_TO (VIEWS () COLUMNS (acme.employees.social_sec_number))
           REMOVE_FROM (VIEWS () COLUMNS ()),
       "EMPLOYEES"
           DESCRIPTION = 'View with employees information'
           ADD_TO (VIEWS (acme.employees) COLUMNS ())
           REMOVE_FROM (VIEWS () COLUMNS ()));
    

ALTER TAG syntax

To edit an existing tag, use ALTER TAG.

Syntax of the ALTER TAG statement
ALTER TAG <name:identifier>
    [ DESCRIPTION = <description:literal> ]
    [ <assignations> ]

<assignations> ::= (see CREATE TAG syntax)

Example:

Example of the ALTER TAG statement
ALTER TAG "SSN"
    DESCRIPTION = 'Social Security Number'
    ADD_TO (VIEWS () COLUMNS (acme.employees_and_customers.social_sec_number))
    REMOVE_FROM (VIEWS () COLUMNS (acme.employees.social_sec_number));

DROP TAG syntax

To remove an existing tag, use DROP TAG or DROP TAGS.

Syntaxes of the DROP TAG statements
DROP TAG [ IF EXISTS ] <name:identifier> [ CASCADE ]

DROP TAGS [ IF EXISTS ] (<name:identifier> [ , <name:identifier> ]* ) [ CASCADE ]

Example:

Example of the DROP TAGS statement
DROP TAGS IF EXISTS ("SSN", "EMPLOYEES");
Add feedback