Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestream Composite Key doesn't work #9025

Open
AnonHax0r opened this issue May 28, 2024 · 1 comment
Open

Timestream Composite Key doesn't work #9025

AnonHax0r opened this issue May 28, 2024 · 1 comment
Labels
bug This issue is a bug. documentation This is a problem with documentation. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@AnonHax0r
Copy link

Describe the bug

Adding a composite key fails on validation, saying you can only specify one key. Documentation shows you can list multiple as you would expect, and the order would determine the heirarchy. The shorthand for --schema is also failing to parse the inputs correctly.

Example input that fails:

aws timestream-write create-table --database-name example-database --table-name composite-test --retention-properties '{"MemoryStoreRetentionPeriodInHours": 24, "MagneticStoreRetentionPeriodInDays": 830}' --schema '{ "CompositePartitionKey": [ { "Type": "DIMENSION", "Name": "station", "EnforcementInRecord": "REQUIRED" }, { "Type": "DIMENSION", "Name": "device_id", "EnforcementInRecord": "REQUIRED" } ] }'

Expected Behavior

I expected a table with a composite key to be created using 'station' and 'device_id'

Current Behavior

An error occurred (ValidationException) when calling the CreateTable operation: You have specified too many partition keys to be used in your composite partition key. Only 1 partition keys can be specified.

Reproduction Steps

aws timestream-write create-table --database-name example-database --table-name composite-test --retention-properties '{"MemoryStoreRetentionPeriodInHours": 24, "MagneticStoreRetentionPeriodInDays": 830}' --schema '{ "CompositePartitionKey": [ { "Type": "DIMENSION", "Name": "station", "EnforcementInRecord": "REQUIRED" }, { "Type": "DIMENSION", "Name": "device_id", "EnforcementInRecord": "REQUIRED" } ] }'

Possible Solution

Unsure

Additional Information/Context

No response

CLI version used

2.15.58

Environment details (OS name and version, etc.)

Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

@AnonHax0r AnonHax0r added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 28, 2024
@tim-finnigan tim-finnigan self-assigned this Jun 5, 2024
@tim-finnigan tim-finnigan added documentation This is a problem with documentation. investigating This issue is being investigated and/or work is in progress to resolve the issue. service-api This issue is due to a problem in a service API, not the SDK implementation. labels Jun 5, 2024
@tim-finnigan
Copy link
Contributor

tim-finnigan commented Jun 5, 2024

Thanks for reporting this issue. The ValidationError is coming from the underlying CreateTable service API. And the limitation of one partition key does not seem to be documented. I'll transfer this to our cross-SDK repository (since service APIs like this are used across AWS SDKs in addition to the CLI) and reach out to the Timestream team for clarification here.

In the future you can also use the Provide feedback at the bottom of the API documentations to send feedback directly to the appropriate team, and andy changes will get automatically reflected in the CLI/SDK documentation. (ref: P133768076)

@tim-finnigan tim-finnigan removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-triage This issue or PR still needs to be triaged. labels Jun 5, 2024
@tim-finnigan tim-finnigan transferred this issue from aws/aws-cli Jun 5, 2024
@tim-finnigan tim-finnigan added the p2 This is a standard priority issue label Oct 30, 2024
@tim-finnigan tim-finnigan removed their assignment Oct 30, 2024
@tim-finnigan tim-finnigan transferred this issue from aws/aws-sdk Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. documentation This is a problem with documentation. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants