Selecting one or more specific fields in query
Hello Community,
I've been trying to figure out how to use the "select" key in the JSON query functionality of QueryStreamData...
me.QueryStreamData({
// oldestFirst: undefined /* BOOLEAN */,
// maxItems: undefined /* NUMBER {"defaultValue":500} */,
// sourceTags: undefined /* TAGS */,
// endDate: undefined /* DATETIME */,
// query: undefined /* QUERY */,
// source: undefined /* STRING */,
// startDate: undefined /* DATETIME */,
// tags: undefined /* TAGS */,
// });
However I haven't had any luck...
There is no datashape returned for this service, and even if there was one, I'm not entirely sure I could get it to work.
I have do have a datashape for the stream of course, and I did try to use that using the following query:
"select": [
{
"dataShapeName": "MyDataShape",
"fieldName": "FieldName"
}
]
But that didn't work either.
I also tried just querying everything from my stream and doing an infotable query:
let test = DataShapes["MyDataShape"].CreateValuesWithData({
values: { values },
});
// Provide your filter using the format as described in the help topic "Query Parameter for Query Services"
let query = {
"select": [{
"dataShapeName": "MyDataSHape",
"fieldName": "FieldName",
}],
};
let params = {
t: test /* INFOTABLE */,
query: query /* QUERY */,
};
result = Resources["InfoTableFunctions"].Query(params);
But this also didn't work... Anyone got any idea of what I am doing wrong?
Or that has done this with success before?
Any help would be highly appreciated!
Thanks,
Jens C.

