moto icon indicating copy to clipboard operation
moto copied to clipboard

Any plans for support for TimestreamQuery ?

Open cipher1729 opened this issue 11 months ago • 3 comments

Hi, is there any plan to support Timestream Query (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/timestream-query.html). We heavily use moto in our services and we do see support for TimestreamWrite (https://docs.getmoto.org/en/latest/docs/services/timestream-write.html), but having support for Query would be great.

cipher1729 avatar Mar 05 '24 20:03 cipher1729

Hi @cipher1729, I'll mark it as an enhancement. Which methods specifically (besides query) are you after?

I don't see a way for us to completely emulate AWS' behaviour here, so the results of query will be either static, or configurable by the user. Do you have a preference? Would returning an empty list of rows work, or is that too simplistic?

bblommers avatar Mar 06 '24 21:03 bblommers

Thank you, we are looking for query, get_paginator, and the scheduled query ones create_scheduled_query , update_scheduled_query. Ah i see.. are there challenges to implementing AWS behavior specifically for Timestream-query which doesn't apply to timestream-write?

cipher1729 avatar Mar 08 '24 01:03 cipher1729

Well, writing data is easy- we just have a regular list with all the data send by the user.

Supporting the query function means parsing the incoming query, which comes in a custom SQL dialect. I'm not aware of any opensource Python library to parse this dialect, and the alternative is writing our own parser - which is not something I personally have the time or energy for!

bblommers avatar Mar 08 '24 18:03 bblommers

The TimeStreamQuery-service is now available as of moto >= 5.0.14.dev18.

Please see https://docs.getmoto.org/en/latest/docs/services/timestream-query.html for up-to-date information on which methods have been implemented. Here you can also see how to configure custom query results.

Let us know if you run into any issues!

bblommers avatar Aug 22 '24 10:08 bblommers