Created
February 5, 2023 16:48
-
-
Save achad4/09660a48b92e66e74875cbc2f6817a4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
dynamodb = boto3.resource("dynamodb") | |
params = { | |
'TableName': "customer_purchase_ts", | |
"KeySchema": [ | |
{"AttributeName": "customer_id", "KeyType": "HASH"}, | |
{"AttributeName": "transaction_date_epoch", "KeyType": "RANGE"} | |
], | |
"AttributeDefinitions": [ | |
{"AttributeName": "customer_id", "AttributeType": "S"}, | |
{"AttributeName": "transaction_date_epoch", "AttributeType": "N"}, | |
], | |
#Other settings... | |
} | |
table = dynamodb.create_table(**params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment