Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The uSmart Resource Query Language (URQL) enables you to query the data stored in uSmart in order to perform actions including downloading data, creating visualisations and aggregating data. Querying data can be doneThe manual is available here and it can be used in the following ways:

Table of Contents

Within a dataset using the query builder

Here you can use the filter and sort options and this actually creates a URQL for you!

...

Within a dataset using the latest urql

Here is where you can take a single view of the data with a query - this particular query is against a static point in time for the data. For querying the latest version use the uSmart client SDK connection (see below).

...

Within a dataset when creating a visualisation using viz wiz

To create a visualisation within the Visualisation Wizard you need to have some knowledge of URQL. Visualisations are added by selecting the Visualisation Tab when signed into a dataset and clicking to add, copy or edit a visualisation.

Add in Cameron’s latest visualisations.

By connecting to a dataset via the USMART client SDK

Connection is done via the SDK and guidance can be found on the Discovery view of the dataset

...

Use the organisation and dataset GUIDs to connect to the USMART real-time service. After that, it's all up to you. The code samples on this page show the subscription code for each supported client SDK. If you have not already done so, set up one of our client SDKs and get started.

Access GUIDs

The organisation publishing the dataset.
Organisation GUID Example: 9261083136-6c2b-4a26-a0a0-b903bde0dc46

...

You may also need to include your user account and an API key to connect. An example code and SDK is shown as follows:

...

Code

var usmartSDK = require('usmart-sdk');
var usmart = new usmartSDK.USMART({keyId: "<>", keySecret: "<>"});

...

usmart.subscribe(organisation, dataset).progress(function(data){
console.log(data.value);
});

Cacheing

Cacheing can be used to help improve query return reliability and speed up the return of data from a dataset. This is done by adding the term cache=true

Code Block
cache=true

. An example of that being used is shown below:

  • https://api.usmart.io/org/92610836-6c2b-4a26-a0a0-b903bde0dc46/4dd7a850-858c-4e65-a456-772f76e93ec1/latest/urql?limit(-1)&gt(Timestamp,Date1)&cache=true

Page Properties
hiddentrue

Related issues