Sharing queries
In addition to sharing queries from previously run queries, The Db2 Graph Share feature allows you to create a sharable link to a query that was run, as well as any insights that were applied to the query.
You access the Share feature from the toolbar, which opens a dialog box.
Shared links can be generated as:
- URLs
- Embeddable links in Jupyter notebooks
- Embeddable links in Javascript
- Embeddable links in HTML
For each type of link, a copy button is available to copy the source code to the clipboard.
When you use an embeddable share query link Db2 Graph operates in embed mode, which simplifies the user interface. By default, Db2 Graph uses an embed mode of 1.
?embedMode=value to the end of the
URL: https://db2graph:3000?embedMode=1.Once enabled, a setting stays active until you perform one of the following actions:
- Log out of Db2 Graph
- Close the tab or browser
- Perform a direct navigation to Db2 Graph by entering the URL (https://db2graph:3000) into the address bar of your web browser and pressing Enter.
When using any embed mode, the changes from embedMode=1 are
automatically applied. For example, if you share a query visualization and set the
embedMode=2 in your URL, the query visualization includes the changes applied to it
previously when the embedMode was set to 1.
The following table lists the embed modes, the releases in which they were made available, and descriptions of what each one alters in the user interface:
| Embed Mode | Explanation | In Release |
|---|---|---|
| 1 | Hides the top level navigation/header bar. This is the default embedMode when you share a query to embed. | 11.5.6 |
| 2 | Hides the query editor input and query editor toolbar except for reset zoom, freeze network, graph settings and show raw data. | 11.5.6-cn2 |
| 3 | Hides the query editor input, visualizations panel, and query editor toolbar. | 11.5.8 |