Rename and comment on data connections
As NodeGraph identifies Data Sources, they are added as nodes in the graph, collecting all queries made using that connection as children. In NodeGraph, you have the possibility to rename your data connections. This will make your Dependency Explorer even easier to understand.
In the image above, the connection is called Connect in connect_db_2.qvw . Follow the steps below to rename to a more user-friendly format.
Rename via the GUI
Renaming can be done on the Dependency Explorer by right-clicking on the Node you would like to change:
In the Rename Datasource dialog, you will need to fill in the following fields:
Remap name: The top Node name you wish to have.
Connection ID: The unique NodeGraph ID for the connection (this is auto populated)
Default database: On all queries that are using this connection, this is the assumed database unless explicitly defined in the query.
Before the remap is applied, the Nodes look like this in the Dependency Explorer:
After the remap is applied, the Nodes have more descriptive name:
These remaps can be found in the Visualization >Rename section in the NodeGraph Settings.
Rename via trace hint (Qlik specific)
Renaming via trace hint is the recommended approach when renaming connections.
When defining usage in Qlik, you can supply a hint to the NodeGraph parser stating that you would like a specific name for the connection. The hints follow the same logic as the Remap option above.
Qlik code without hints:
OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=TESTDATA;Data Source=.];
The above code generates the following node structure:
The hint follows the same logic as the Remap in the GUI. This can be further explained as follows:
Trace: Qlik Command creates string out in the log.
!!nodegraph: is the NodeGraph specific flag.
“Connect”: Connects places NodeGraph in a state where all trailing connections and queries will use this command. Using a trace next to each OLEDB/ODBC will produce the desired effects.
“NAME”: The name of the connection. This will be show in the top Node.
“DATABASE”: Default Database assumed on each query unless specified.
“SCHEMA”: Default schema assumed on each query unless specified.
Rename HTTP nodes (Qlik specific)
The same logic applies when renaming HTTP data sources. The syntax is:
Add comment to data source node (Qlik specific)
You can also add comments to a data source node by using the following syntax:
Include table and field comments defined in scripts (Qlik specific)
NodeGraph support comments from script log file, with some restrictions:
QVD: full support since existing metadata from file is used.
QVW/QVF: Partial support - script logs are parsed for comments, with the limitation that comments added using an apply map will not be available.
Each QVW/QVF will give a warning in the message window in the Dependency Explorer when applymaps been used for comments.