Hi,
We are using graphql query to get data points in CDF function. As I understand we could retrieve 1,00000 data points at a time if we provide the limit. Here is the sample query:
query MyQuery {
listProductionData(
filter: {externalId: {in: ["wellbore1"]}}
) {
items {
space
data {
Oil {
1_day {
dataPoints(end: 2240591400000, limit: 100000, start: 1672338600000) {
value
timestamp
}
}
}
}
}
}
}
I tried above query and I can get all the daily datapoints present in the range from 2023-01-01 to 2040-12-31.
But when I tried below query :
query MyQuery {
listProductionData(
filter: {externalId: {in: ["wellbore1"]}}
) {
items {
space
data {
Oil {
1_day {
getDataPoints(start: 1672338600000, end: 2240591400000) {
items {
timestamp
value
}
}
}
}
}
}
}
}
we can get only 10 data points at a time. I don’t see any limit option when we use getDataPoints. Can you please help to understand the difference between dataPoints and getDataPoints? Any reason that limit option is not part of getDataPoints. Which one is safe to use considering your deprecation strategy?
We are dealing with only daily and monthly data points so we don’t want to use cursor and it will be helpful to get all the data points at once with limit option and also as this will be executed in Cognite function in CDF workflow, we don’t want to track the cursors.
Also please note, we don’t want to use SDK to get data points as our destination model matches with Graphql response structure so we thought to use Graphql result as is without doing lot of conversion needed to match with destination schema.
Thanks.