moto
moto copied to clipboard
Any plans for support for TimestreamQuery ?
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.
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?
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?
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!
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!