Knowi enables visualization, warehousing, and reporting automation from TigerGraph along with other structured and unstructured datasources.
Overview
Connect, extract, and transform data from your TigerGraph database, using the query generation capabilities of Knowi to write your queries. You can also make use of Cloud9Agent. This can securely pull data inside your network. See agent configuration for more details.
Add TigerGraph Datasource
- Log in to Knowi and select Queries from the left sidebar.
- Click on New Datasource + button and select TigerGraph from the list of datasources.
-
After navigating to the New Datasource page, follow the prompts and configure the following details to set up connectivity to your own TigerGraph database:
- Datasource Name: Enter a name for your datasource
- Host Name: Enter the hostname to connect to
- Port: Enter the database port
- Database Name: Enter the name of the database
- User: Enter the User ID to connect
- Password: Enter the password to connect to the database
- Request Token URL: The endpoint to call to exchange the secret key to access the token, could be used instead of a user name and password pair. May include a secret key and other options
- Request Token POST: Check this box (defaults to GET otherwise) if the request token URL need to be called with the POST method. Add in any data payloads expected, which may include a secret key
- Establish Network connectivity and click on the Test Connection button.
Note: The connection validity of the network can be tested only if it has been established via Direct Connectivity or an SSH tunnel. For more information on connectivity and datasource, please refer to the documentation on- Connectivity & Datasources.
- Click on Save and start Querying.
Query TigerGraph Datasource
The TigerGraph Datasource can be queried in seven different ways:
- Run Installed Query
- Run Interpreted Query
- Run Built-in Function
- Get Vertex
- Get Edge
- Find Shortest path
- Find All Paths
Run Installed Query
This query mode runs a TigerGraph-installed query which is possible to select from a list of installed queries and pass parameters to the query. This is the most efficient way.
Note: The options available may change depending on the metric you select.
Query Type: Select the query type
Installed Query: Select a query from the list of installed queries to run
Run Parameters: List of parameters to run a query.
Here is an example of using an installed query against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output, if required.
Below are the preview results of the Query based on the above example.
Run Interpreted Query
This query mode runs a TigerGraph query which is not installed. It can be typed right into Knowi UI with parameters.
Note: The options available may change depending on the metric you select.
Query Type: Select the query type
Run Parameters: List of parameters to run a query.
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output, if required.
Below are the preview results of the Query based on the above example.
Run Built-in Function
This query mode runs a TigerGraph built-in function. More details at the TigerGraph docs.
Note: The options available may change depending on the metric you select.
Query Type: Select the query type
Built-in Function Type: Select the built-in function kind
Vertex Type: Select vertex type
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output if required.
Below are the preview results of the Query based on the above example.
Get Vertex
This query mode gets a vertex/vertices with a selected type, filtering by optional attributes and sort.
The options available may change depending on the metric you select.
Query Type: Select the query type
Vertex Type: Select vertex type
Vertex ID: Select ID (Optional)
Metrics: Attributes of the selected vertices/edges to return (Optional)
Filters: Filter to limit data for. Select a field to specify the filter (Optional)
Sort: Fields to sort the results by (Optional)
Limit: Limit the number of records from the datasource. Defaults to 10,000 records for preview if empty.
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output if required.
Below are the preview results of the Query based on the above example.
Get Edge
This query mode gets an edge/edges with selected type, filtering by optional attributes and sort.
Note: The options available may change depending on the metric you select.
Query Type: Select the query type
Vertex Type: Select vertex type
Vertex ID: Select ID (Optional)
Edge Type: Select edge type
Target Vertex Type: Select the target vertex type
Target Vertex ID: Select target vertex ID (Optional)
Metrics: Attributes of the selected vertices/edges to return (Optional)
Filters: Filter to limit data for. Select a field to specify the filter (Optional)
Sort: Fields to sort the results by (Optional)
Limit: Limit the number of records from the datasource. Defaults to 10,000 records for preview if empty.
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output if required.
Below are the preview results of the Query based on the above example.
Find Shortest Path
This query mode finds the shortest path between 2 vertices.
Note: The options available may change depending on the metric you select.
Query Type: Select the query type
Vertex Type: Select vertex type
Vertex ID: Optional. Select ID
Target Vertex Type: Select the target vertex type
Target Vertex ID: Optional. Select target vertex ID
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output if required.
Below are the preview results of the Query based on the above example.
Find All Paths
This query mode finds all paths between 2 vertices.
The options available may change depending on the metric you select.
Query Type: Select the query type
Vertex Type: Select vertex type
Vertex ID: Select ID (Optional)
Target Vertex Type: Select the target vertex type
Target Vertex ID: Select target vertex ID (Optional)
Limit: Limit the number of records from the datasource. Defaults to 10,000 records for preview if empty.
Here is an example of a Query made against TigerGraph Datasource:
Click on the Preview button to analyze the results of your Query and fine-tune the desired output if required.
Expand Results Feature
It does the expanding of data returned by the Tigergraph server. It is set by default. With this “Expand” it allows you to easily see the output content in the grid and filter on fields.
Though plotting the graph chart is allowed with any data, expanded or not expanded.
Data Execution Strategy
Define data execution strategy by using any of the following two options:
-
Direct Execution: Directly execute the Query on the original Datasource, without any storage in between. In this case, when a widget is displayed, it will fetch the data in real-time from the underlying Datasource.
- Non-Direct Execution: For non-direct queries, results will be stored in Knowi’s Elastic Store. Benefits include- long-running queries, reduced load on your database, and more.
Non-direct execution can be put into action if you choose to run the Query once or at scheduled intervals. For more information, feel free to check out this documentation- Defining Data Execution Strategy.
Create Dataset
The result of your Query is called Dataset. After reviewing the results, name your dataset and then hit the Create & Run button.