Does AWS Timestream support UDFs (user defined functions)

0

Does AWS Timestream support UDFs (user defined functions) similar to the UDFs support in Amazon Athena?

AWS
Ra
질문됨 2년 전265회 조회
1개 답변
0

No, Timestream doesn't support user-defined functions (UDFs) at this time.

If your function is simple enough, you might be able to accomplish your goal with a reduce function, which really lets you apply two inline functions (an input and output function) to transform your data. Here's a link to the docs,

https://docs.aws.amazon.com/timestream/latest/developerguide/timeseries-specific-constructs.functions.filter-reduce.html#w3aac25c13c13c23b9

Otherwise, you could write an AWS Lambda that consumes you table and writes back to either the same table or a different table. Timestream will support sparse columns, so you can have a lambda that is back-filling a column in a multi-measure row that initially doesn't exist for all records. You would need to read out the row, enrich it, and then write back the same data for the other columns with a higher version number.

Finally, scheduled queries are another way to automatically enrich your data. You could have a scheduled query that computes your "function" (separate query) result and pushes the record back to the same table or to a different table, in a different format. The nice thing is that the scheduled query engine will bump the version number for you. Here are the docs on scheduled queries:

https://docs.aws.amazon.com/timestream/latest/developerguide/scheduledqueries.html

NadirS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인