aws / aws/aws-cli

Timestream Composite Key doesn't work

Open
#9,025 1 comment 0 reactions 0 assignees View on GitHub
bug documentation p2 service-api
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.