Querying Models Using the Parameters Feature
The parameters feature makes it possible for you to query a model within Data Hub Visualization based on information provided in the URL. By entering the name of the model with one of the query parameters followed by a value, you can bypass the traditional steps of querying a model.
This feature is useful in situations where you want to share all or specific parts of a model but don't want the recipient to have to complete the steps it would otherwise take to access the information. You can provide the URL—the address of the server, the model name, plus these parameters—and the recipient will go directly to the data you want to share.
as you change a model or enter a query, the URL in the address bar will update to reflect your actions; this will enable you to open a model, run a query, and copy from the address bar.
Saved Queries
Saved queries are performed using the ?query parameter and the optional input parameter.- Be sure the Spectrum™ Technology Platform server is running.
- Open a web browser.
- Type the following and press Enter:
- http://<servername>:<port>/hub-visualization/#/<modelname>/view/canvas
- "?query="
- The name of the query
Based on how the query was configured, let's say that it returns all doctor entities with a ZIP Code that begins with "9". The specific ZIP Code is included in the query as an optional input value based on a field; in this case, the query returns entities whose values in the "ZIP" field start with "9".
You can pass this data using the input parameter along with a JSON array of name/value pairs in the following format: input=[{"name":<field name>, "value":<field value to search for>}]. For example, if you wanted to limit the query to Hermosa Beach, a suburb of Los Angeles, you would enter the following: http://myserver:8080/hub-visualization/#/Fraud/view/canvas?query=California&input=[{"name":"ZIP", "value":<"90254"}]
- Date: YYYY-MM-DD
- Time: HH-MM-SS
- DateTime: YYYY-MM-DDTHH:MM:SS
Natural Language Queries
Natural language queries are performed using the ?search parameter.- Be sure the Spectrum™ Technology Platform server is running.
- Open a web browser.
- Type the following and press Enter:
- http://<servername>:<port>/hub-visualization/#/<modelname>/view/canvas
- "?search="
- The search string