cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

Unable to deploy Timestream scheduled query when querying an empty table

Open furrycatherder opened this issue 9 months ago • 1 comments

Name of the resource

AWS::Timestream::ScheduledQuery

Resource name

No response

Description

Attempting to deploy a ScheduledQuery that queries an empty table results in an exception:

ScheduledQuery: Resource handler returned message: "line 12:25: Column 'foo' does not exist (Service: AmazonTimestreamQuery; Status Code: 400; Error Code: ValidationException; Request ID: OSQH3TTQWMV4BP6W7NKAZS324M; Proxy: null)" (RequestToken: a86574da-20c5-0081-1c7f-05eae4b55b2f, HandlerErrorCode: InvalidRequest)

It would be nice if this were a warning instead of an error, or if the construct could be deployed but execution deferred until the validation passes. The current behavior makes deployment of tiered scheduled queries especially inconvenient.

Other Details

No response

furrycatherder avatar Apr 26 '24 16:04 furrycatherder

Part of the problem here is incomplete implementation of the Table resource. There is schema support for partition keys, but it should also allow for dimension and measure values, which would allow an initial ‘seeding’ of the tables column names.

I understand a workaround is to create a custom resource which has a function attached to seed the table with a single dummy row at deploy time, which then allows the query to be deployed in the same deploy cycle.

dmeehan1968 avatar Jun 26 '24 22:06 dmeehan1968