This topic describes the naming conventions of aliases. This topic also provides examples of aliases.
Naming conventions
A column name specified in an SQL statement can contain letters, digits, and underscores (_). The name must start with a letter. If you specify a column name that does not comply with the SQL-92 syntax when you collect logs, you must specify an alias for the column name when you configure indexes. For more information about how to configure indexes, see Create indexes.
You can specify a short alias for a column whose original name is long and use the alias in an analytic statement.
Use aliases only in analytic statements. The underlying storage retains the original column name. That is, use the original column name in search statements and the alias in analytic statements.
For example, if a column name such as client-ip contains a hyphen, it does not comply with the SQL-92 syntax. In this case, you can set its alias to client_ip.
Examples
|
Column |
Alias |
|
User-Agent |
User_Agent |
|
User.Agent |
user_agent |
|
123 |
col |
|
abceefghijklmnopqrstuvw |
abc |