The alias file
The alias file is a YAML file that gives alternative names to the default names of the Wazi Deploy data and technical fields. If a query uses alternative names for the data and technical fields, then you must create an alias file, where you match the default names with the alternative names.
The data fields are present in the Wazi Deploy evidence files. They can be, for example, the name of an activity or an action, or the name or type of an artifact. The technical fields are stored in the records at indexing time or computed.
An alias file is optional. Its default name is aliases.yml. By default, you must store this file either in the folder that contains the query that it applies to or in the folder from which you run the wazideploy-evidence command.
When you run the wazideploy-evidence command to analyze the Wazi Deploy deployment, the alias file must be available if the query uses alternative names for the data and technical fields.
To assign an alternative name to a data or a technical field, enter its default name and its alias name on the same line, as it is shown in the following examples.
Overwriting the default names of data fields
To overwrite the default names of data fields, create a line in the alias file and enter the default name and the alias name of the data field.
host alias for the
inventory_hostname data field, enter the following line in the alias
file:inventory_hostname: host Then, when you write your query, you can refer to the inventory_hostname field
by specifying inventory_hostname or host.
Overwriting the default names of technical fields
You can use the technical fields as selection criteria in the select clause of a
query and as output parameters in the output clause of a query.
The following code lines show the default names of the technical fields. The first technical fields, down to ymli_version, are documented in Using technical fields in a select clause. The next technical fields are documented in The technical fields in an output clause.
For example, if you want to rename ymli_id as IDENT instead of
ID, simply overwrite ID with IDENT. Then, when
you write your query, you can refer to the ymli_id field by specifying
ymli_id or IDENT.
# Technical fields aliases
ymli_id: ID
ymli_folder: FOLDER
ymli_file: FILE
ymli_level: LEVEL
ymli_category: NODE
ymli_parent_id: PARENT_ID
ymli_parent:
- '..'
- PARENT
ymli_rank: NODE_RANK
ymli_line: LINE
ymli_stop_line: ENDLINE
ymli_version: VERSION
ymli_all_fields: ALL
ymli_data_fields: DATA
ymli_technical_fields: META
ymli_stored_fields: STORED
ymli_queried_fields: QUERIED
ymli_full_location: LOCATION
ymli_location: SHORT_LOCATION
ymli_file_path: SHORT_PATH
ymli_full_file_path: PATH
ymli_selection: COUNT
ymli_terminal_data_fields: TERMINAL
ymli_composite_data_fields: COMPOSITE