Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to dynamic paging the orion context with the specific type in Idra? #110

Open
zongring opened this issue Jan 18, 2022 · 1 comment

Comments

@zongring
Copy link

1、As i know the NGSI v2/entities get rest api support the limit(up to 1000) and offset parameter,I setup the idra Catalogues below:
[{
"title": "SampleData",
"description": "",
"theme": [
"GOVE"
],
"keywords": [
"SampleData"
],
"distributions": [
{
"title": "SampleData",
"description": "",
"distributionAdditionalConfig": {
"query": "type=SampleData&options=keyValues,count",
"fiwareService": "",
"fiwareServicePath": ""
},
"mediaType": "",
"license": {
"uri": "",
"name": "license",
"type": "",
"versionInfo": ""
}
}
]
}
]

the count of SampleData is 20000+ or more but the v2/entities get rest can only return 1000 max records。how can i deal with this condition.

2、the Idra datalet table is then same scene,is there any way to dynamic paging the CB datas in the table?

Look forward to your reply

thanks!

@robcalla
Copy link
Collaborator

Dear @zongring, thanks for using Idra.
The automatic pagination at data level is not supported. A possible solution might be defining several distributions where you can specify in the query the offset and limit parameters supported by the CB, e.g.:

"distributionAdditionalConfig": {
"query": "type=SampleData&options=keyValues,count&offset=0&limit=1000",
"fiwareService": "",
"fiwareServicePath": ""
},

In this specific case, considering that the count is 20000+ entities you should define at least 20 distributions managing the offset appropriately (the limit will be fixed at 1000 considering CB fixed limit).

About the datalets, the situation is the same as the one described above. Since the component that manages the datalets relies on the data provided by each distribution.

Please, let me know if you need further support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants