Skip to main content Skip to complementary content

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.

Data connection name

The Dependency Explorer with default names.

In the image above, the connection is called Connect in connect_db_2.qvw [1]. 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:

Right-click on Node to select "Rename"

When right-clicking on a node, Rename appears at the top of the right-click menu.

Rename Dialog

The Rename Datasource dialog

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:

Node name prior to Remap

A connection and containers with lengthy names.

After the remap is applied, the Nodes have more descriptive name:

Node after Remap

A connection and containers with descriptive names.

These remaps can be found in the Visualization >Rename section in the NodeGraph Settings.

NodeGraph Settings for Renames

The Rename section of the Visualization tab in 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:

Trace !!nodegraph "Connect" "LOCAL SQL - TEST" "TESTDATA" "dbo";
OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=TESTDATA;Data Source=.];
qualify *;
TableData_1:SQL
SELECT
A
, B
, C
FROM TableDATA;
unqualify *;

The above code generates the following node structure:

Node structure (Qlik code without hints)

Containers A, B, and C, which contain TableData A, B, and C.

The hint follows the same logic as the Remap in the GUI. This can be further explained as follows:

Trace !!nodegraph "Connect" "NAME" "DATABASE" "SCHEMA" ;

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:

trace !!nodegraph "remotegroup" "Wikipedia";

Add comment to data source node (Qlik specific)

You can also add comments to a data source node by using the following syntax:

trace !!nodegraph "sqlcomment" "This will be added to queries";

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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!