Get Streamed Datasource Results
/essbase/rest/v1/applications/{applicationName}/datasources/query/stream
Returns results in stream from an application-level Datasource.
Request
-
applicationName(required): string
Application name.
-
includeHeaders: boolean
Include headers with query results? If true, the first record of the results will consist of column headers.
Default Value:false
-
metaDataOnly: boolean
Stream metadata only?
Default Value:false
Query information. Object specifying the SQL query if used, the record delimiter used in the source data, and information about any parameters associated with the Datasource.
object
-
delimiter:
string
-
params:
object params
Additional Properties Allowed: additionalProperties
-
query:
string
object
Response
- application/json
- text/plain
- text/csv
200 Response
OK
Results fetched successfully.
400 Response
Bad Request
Failed to stream results.
500 Response
Internal Server Error.
Examples
The following examples show how to fetch streamed results from an application-level Datasource.
These examples use cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat
.
Script with cURL Command - Stream Metadata Only
call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/datasources/query/stream?metaDataOnly=true -H "accept: application/json" -H "Content-Type: application/json" -d '{"query":"SELECT * FROM Orcl_DS", "delimiter": ","}' -u %User%:%Password%
Sample Response - Stream Metadata Only
Results from the Datasource are in text/CSV format.
"DIMENSION_PRODUCT","DIMENSION_MARKET","DIMENSION_YEAR","DIMENSION_SCENARIO","SALES","COGS","MARKETING","PAYROLL","MISC","INITIAL_INVENTORY","ADDITIONS"
Script with cURL Command - Stream Data and Headers
call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/datasources/query/stream?includeHeaders=true -H "accept: application/json" -H "Content-Type: application/json" -d '{"query":"SELECT * FROM Orcl_DS", "delimiter": ","}' -u %User%:%Password%
Sample Response - Stream Data and Headers
Results from the Datasource are in text/CSV format. The following streamed results are truncated for length.
"DIMENSION_PRODUCT","DIMENSION_MARKET","DIMENSION_YEAR","DIMENSION_SCENARIO","SALES","COGS","MARKETING","PAYROLL","MISC","INITIAL_INVENTORY","ADDITIONS"
"100-20","Washington","Aug","Actual","317.0","133.0","120.0","29.0","1.0","","304.0"
"100-20","Washington","Aug","Budget","390.0","160.0","110.0","20.0","","","350.0"
"100-20","Utah","Aug","Actual","160.0","72.0","27.0","33.0","1.0","","153.0"
"100-20","Utah","Aug","Budget","200.0","90.0","20.0","30.0","","","170.0"
"100-20","Nevada","Aug","Actual","90.0","41.0","12.0","21.0","0.0","","86.0"
"100-20","Nevada","Aug","Budget","110.0","50.0","10.0","20.0","","","100.0"
"100-20","Texas","Aug","Actual","120.0","52.0","17.0","12.0","0.0","","114.0"
"100-20","Texas","Aug","Budget","150.0","60.0","10.0","10.0","","","130.0"
"100-20","Oklahoma","Aug","Actual","55.0","22.0","6.0","11.0","0.0","","52.0"
"100-20","Oklahoma","Aug","Budget","60.0","20.0","0.0","10.0","","","60.0"
"100-20","Louisiana","Aug","Actual","154.0","63.0","17.0","11.0","0.0","","147.0"
"100-20","Louisiana","Aug","Budget","190.0","70.0","10.0","10.0","","","170.0"
"100-10","Oklahoma","Aug","Actual","155.0","68.0","22.0","12.0","0.0","","147.0"
"100-10","Oklahoma","Aug","Budget","190.0","80.0","20.0","10.0","","","170.0"
"100-10","Louisiana","Aug","Actual","118.0","48.0","13.0","11.0","0.0","","113.0"
"100-10","Louisiana","Aug","Budget","140.0","60.0","10.0","10.0","","","130.0"
...