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.

You can use the parameters feature to run saved queries or natural language queries; this functionality is available in the Data Hub Visualization Canvas or Map.
Note: When a query is entered in a browser address bar it becomes URL encoded. Also,

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.
  1. Be sure the Spectrum™ Technology Platform server is running.
  2. Open a web browser.
  3. Type the following and press Enter:
    • http://<servername>:<port>/hub-visualization/#/<modelname>/view/canvas
    • "?query="
    • The name of the query
    For example, if your server is named "myserver", it uses default HTTP port 8080, you are opening a model called "Fraud" containing insurance claim data for the southwestern United States, and you have a saved query called "California", you would enter the following: http://myserver:8080/hub-visualization/#/Fraud/view/canvas?query=California

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"}]

Note: If you enter a query that includes dates or times, they must be included in the native format:
  • 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.
  1. Be sure the Spectrum™ Technology Platform server is running.
  2. Open a web browser.
  3. Type the following and press Enter:
    • http://<servername>:<port>/hub-visualization/#/<modelname>/view/canvas
    • "?search="
    • The search string
    For example, if your server is named "myserver", it uses default HTTP port 8080, you are opening a model called "Fraud" containing insurance claim data, and you want to view a list of hospitals in your model, you would enter the following: http://myserver:8080/hub-visualization/#/Fraud/view/canvas?search=hospital.