Element Names (Identifiers)¶
Every element of Virtual DataPort (data sources, views, web service, databases, etc.) has a name. An identifier is how you represent the name of an element in a VQL statement. In a statement, you represent the name of an object with a quoted identifier or a non-quoted identifier:
A quoted identifier begins and ends with double quotation marks (
"). For example,
"Customer 360". These identifiers can contain any character, including multibyte characters.
A non-quoted identifier is not surrounded by quotes. Non-quoted identifiers have to meet these rules:
The first character has to be in the ranges from “a” to “z” or from “A” to “Z”.
The following characters have to be one of these: in the ranges from “a” to “z”, from “A” to “Z”, a digit or the underscore (“_”).
Non-quoted identifiers cannot be reserved words. Quoted identifiers can be reserved words, although we advise against it to prevent issues when executing queries from other applications.
The maximum length of an identifier is 100 characters.
The name of a view cannot start with underscore (
Non-quoted identifiers are stored in lowercase.
Non-quoted identifiers are case insensitive. That is, if you create the view
CREATE VIEW CUSTOMER_360 AS..., Virtual DataPort stores “customer_360”. At runtime, the following queries are equivalent:
SELECT * FROM CUSTOMER_360; SELECT * FROM customer_360;
If you create an object, it will be stored as a non-quoted identifier if all the characters are lowercase, and the first character is in the range from “a” to “z”, and the following characters are in the rages from “a” to “z”, a digit or an underscore. This is also true even if you surround the name with double quotes. For example, if you create this:
CREATE VIEW "customer360" AS...
This is stored as
customer360and you will not need to use double-quote to refer to this view. That is, you can execute this:
SELECT * FROM customer360;
Within a database, you cannot create two elements with the same name. This restriction is case insensitive. That is, you cannot create a view with the name “CUSTOMER360” and another one with the name “Customer360”.
For example, you cannot create two views with the same name. However, you can create a JDBC data source with the same name as a DF data source because they both are considered a different type of element.
If you create an element with a quoted identifiers, queries always have to refer to this element surrounding the name with double quotes. For example,
SELECT * FROM "Incident";
The options you can configure in Server administration, in the section Identifiers charset, only controls the characters the users can use when creating/editing views from the Administration Tool or the Design Studio. It does not affect the behavior of the Server.
The section Identifiers Charset of the Administration Guide explains the following:
The difference between the two available char sets: “Unicode” and “Restricted”
How changing this affects the user
How to enable or disable this support
Using Back Quotes¶
In old versions of Denodo (Denodo 5.5 and earlier), the character for quoted identifiers is the back quote (
`) instead of the double quote (
Using the back quote is still supported to maintain backward compatibility. However, this is deprecated and we advise against using it because it may be removed in future major versions of Denodo.
For example, the following statements are equivalent:
CREATE VIEW "view with spaces in the name" ... CREATE VIEW `view with spaces in the name` ...