From d5207ee590d885ade90d1897445d62f64479f096 Mon Sep 17 00:00:00 2001 From: Chewy Shaw Date: Thu, 17 Oct 2024 13:57:23 -0700 Subject: [PATCH 1/2] Changed timestamp column in DynamoDB table configuration to match the time column elsewhere in the codebase. --- .../ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala b/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala index ce4fe714b9..0425a56f33 100644 --- a/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala +++ b/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala @@ -1,5 +1,6 @@ package ai.chronon.integrations.aws +import ai.chronon.api.Constants import ai.chronon.online.KVStore import ai.chronon.online.KVStore.GetResponse import ai.chronon.online.KVStore.ListRequest @@ -53,7 +54,7 @@ object DynamoDBKVStoreConstants { val partitionKeyColumn = "keyBytes" // Name of the time sort key column to use - val sortKeyColumn = "timestamp" + val sortKeyColumn = Constants.TimeColumn // TODO: tune these val defaultReadCapacityUnits = 10L @@ -89,7 +90,7 @@ class DynamoDBKVStoreImpl(dynamoDbClient: DynamoDbClient) extends KVStore { val request = CreateTableRequest.builder .attributeDefinitions(keyAttributes.toList.asJava) - .keySchema(keySchema.toList.asJava) + .keySchema(keySchema.toList.asJava)"keyBytes" .provisionedThroughput(ProvisionedThroughput.builder.readCapacityUnits(rcu).writeCapacityUnits(wcu).build) .tableName(dataset) .build From 562a679fb01730d12e8d3e80144ee3092ef454a0 Mon Sep 17 00:00:00 2001 From: Chewy Shaw Date: Fri, 18 Oct 2024 09:25:58 -0700 Subject: [PATCH 2/2] Remove accidental copy paste of "keyBytes" --- .../scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala b/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala index 0425a56f33..0acc31659c 100644 --- a/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala +++ b/cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala @@ -90,7 +90,7 @@ class DynamoDBKVStoreImpl(dynamoDbClient: DynamoDbClient) extends KVStore { val request = CreateTableRequest.builder .attributeDefinitions(keyAttributes.toList.asJava) - .keySchema(keySchema.toList.asJava)"keyBytes" + .keySchema(keySchema.toList.asJava) .provisionedThroughput(ProvisionedThroughput.builder.readCapacityUnits(rcu).writeCapacityUnits(wcu).build) .tableName(dataset) .build