orchestracities / ngsi-timeseries-api

QuantumLeap: a FIWARE Generic Enabler to support the usage of NGSIv2 (and NGSI-LD experimentally) data in time-series databases
https://quantumleap.rtfd.io/
MIT License
37 stars 49 forks source link

DEFAULT_LIMIT is not working #763

Open tonyrosset opened 1 month ago

tonyrosset commented 1 month ago

DEFAULT_LIMIT when set to a value more than 10000, it has noeffect it directs back to 10000

environment:

c0c0n3 commented 1 month ago

@tonyrosset thanks for reporting this, we'll look into it...

c0c0n3 commented 1 month ago

@tonyrosset are you using the limit and last_n params in the API call? If not, it could be there's a problem with CrateDB. I'm just looking at the code that figures out what the SQL limit actual value should be:

What's the API call you make to retrieve results?

tonyrosset commented 4 weeks ago

thanks, I am not using the limit or lastN. By default, when I set no DEFAULT_LIMIT I get 10,000 rows in the API call. When I set it to 100, I get 100 rows as supposed to be. The problem is only when I try to set the limit more than 10,000.

http://localhost:8668/v2/types/hwsensors?attrs=airTemperature&fromDate=2024-05-01T13:00:00&toDate=2024-06-12T09:00:00

c0c0n3 commented 3 weeks ago

@tonyrosset, @pooja1pathak has just landed #765 which should fix the issue.

tonyrosset commented 3 weeks ago

@pooja1pathak thanks, @c0c0n3 Once u have accepted the commit at your repo I can use it, right?

c0c0n3 commented 3 weeks ago

Once u have accepted the commit at your repo I can use it

if you only need to link the code, then the fix will be available as soon as I merge #765 into the main branch. But I guess you'd like to download a Docker image with the fix? We have a GitHub action to automatically build and push Docker images to DockerHub when a PR gets merged into main:

but unfortunately it's broken at the moment---I think it's just a silly thing w/ credentials having expired. Anyhoo, you can still build your own Docker image using the Docker file in the repo's root dir:

there's also a build script:

Hope that helps!

tonyrosset commented 3 weeks ago

thanks, that helps, also, it would be great if you let me know when the docker image is updated. Thanks once again.

c0c0n3 commented 3 weeks ago

sure no prob!

it would be great if you let me know when the docker image is updated.

If you subscribe to repo notifications, GitHub will send you an email every time we merge a PR...

c0c0n3 commented 1 week ago

@tonyrosset #765 should've fixed the problem. So I'm closing this GitHub issue, but please feel free to reopen if the fix doesn't work for you.

c0c0n3 commented 1 week ago

@tonyrosset sorry I've done this too quickly. We haven't merged #765 into main yet, so there's no easy way for you to test just yet. I'll close this issue when @pooja1pathak is done w/ #765 and we finally merge it. Sorry for the confusion!