Query execution component API - AIoTES/DataLayer-DataLake-QueryExecution GitHub Wiki
Each supported sub-service is described in detail below
<tr>
<td><table>
<tbody>
<tr>
<td>Input</td>
<td>
<table>
<tbody>
<tr>
<td>JSON schema</td>
<td><pre> <code>
{ "type": "object", "properties": { "db": { "type": "string", "description": "The name of a DB. Can be empty to return the names of all the DBs and tables." } } }
| /getSchema | |
|---|---|
| Returns the tables names defined in a DB created in the Independent Data Storage. If no DB name is specified, the names of all the Dbs defined in the Independent Data Storage and their corresponding tables are returned. | |
| JSON example | |
<tr>
<td><table>
<tbody>
<tr>
<td>Input</td>
<td>
<table>
<tbody>
<tr>
<td>JSON schema</td>
<td><pre> <code>
{ "type": "object", "properties": { "deviceID": { "type": "array", "description": "Device types of interest", "items": { "type": "string", "description": "A device type" } }, "deviceType": { "type": "array", "description": "Device identifiers of interest", "items": { "type": "string", "description": "The unique identifier of a device" } }, "startDate": { "type": "string", "description": "Start date" }, "endDate": { "type": "string", "description": "End date" }, "platform": { "type": "array", "description": "Platforms of interest", "items": { "type": "string", "description": "Platform type" } }, "ds": { "type": "array", "description": "DSs of interest", "items": { "type": "string", "description": "DS identifier" } } } }
</code></pre></td>
</tr>
<tr>
<td>JSON example</td>
<td><pre><code>
{ "deviceType": ["motionSensor"], "startDate": "2018-02-01T00:00:00.000Z", "endDate": "2018-06-01T00:00:00.000Z", "platform": ["universAAL"] }
</code></pre></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td><table>
<tbody>
<tr>
<td>Output</td>
<td>
<table>
<tbody>
<tr>
<td>JSON schema</td>
<td><pre><code>
{ "type": "object", "properties": { "records": { "type": "array", "description": "The array of retrieved records.", "items": { "type": "object", "description": "The data of a single record, according to its schema." } } } }
| /query | |
|---|---|
| Submits a query to the Data Lake and retrieves the results. | |
| JSON example | |
<tr>
<td><table>
<tbody>
<tr>
<td>Input</td>
<td>
<table>
<tbody>
<tr>
<td>JSON schema</td>
<td><pre> <code>
{ "type": "object", "properties": { "deviceID": { "type": "array", "description": "Device types of interest", "items": { "type": "string", "description": "A device type" } }, "deviceType": { "type": "array", "description": "Device identifiers of interest", "items": { "type": "string", "description": "The unique identifier of a device" } }, "startDate": { "type": "string", "description": "Start date" }, "endDate": { "type": "string", "description": "End date" }, "platform": { "type": "array", "description": "Platforms of interest", "items": { "type": "string", "description": "Platform type" } }, "ds": { "type": "array", "description": "DSs of interest", "items": { "type": "string", "description": "DS identifier" } } } }
</code></pre></td>
</tr>
<tr>
<td>JSON example</td>
<td><pre><code>
{ "deviceType": ["motionSensor"], "startDate": "2018-02-01T00:00:00.000Z", "endDate": "2018-06-01T00:00:00.000Z", "platform": ["universAAL", "independent"] }
</code></pre></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td><table>
<tbody>
<tr>
<td>Output</td>
<td>
<table>
<tbody>
<tr>
<td>JSON schema</td>
<td><pre><code>
{ "type": "array", "description": "Calls to the the historical data web services", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "URL for calling the web service with the given parameters" }, "headers": { "type": "object", "description": "HTTP headers needed for the web service call" } } } }
</code></pre></td>
</tr>
<tr>
<td>JSON example</td>
<td><pre><code>
[ { "url": "http://examplewebservice.com/measurements/all?deviceType=motionSensor&startDate=2018-02-01T00%3A00%3A00.000Z&endDate=2018-06-01T00%3A00%3A00.000Z", "headers": { "Authentication": "Basic QWxhZGRpbjpPcGVuU2VzYW1l" } }, { "url": "http://independentdatastorage.com/independentStorage/select?db=independent&table=motionSensor&query=SELECT%2B*%2BFROM%2B%2522independent%2522%2BWHERE%2Btime%2B%253E%253D%2B%2527Thu%2BFeb%2B01%2B00%253A00%253A00%2BCET%2B2018%2527%2BAND%2Btime%2B%253C%253D%2B%2527Fri%2BJun%2B01%2B00%253A00%253A00%2BCEST%2B2018%2527", "headers": {} } ]
</code></pre></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table></td>
</tr>
| /querytranslation |
|---|
| Converts a query to the data lake into a series of calls to the historical data webservices. |