Skip to content

Instantly share code, notes, and snippets.

@RatulSaha
Last active December 9, 2019 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RatulSaha/aa908cc3851383b9420367e63fb0decf to your computer and use it in GitHub Desktop.
Save RatulSaha/aa908cc3851383b9420367e63fb0decf to your computer and use it in GitHub Desktop.
{
"ModelName": "Example from Alex Debrie (re:Invent 2019)",
"ModelMetadata": {
"Author": "Ratul Saha",
"DateCreated": "Dec 09, 2019, 9:29 PM",
"DateLastModified": "Dec 10, 2019, 12:36 AM",
"Description": ""
},
"DataModel": [
{
"TableName": "FancyEcommerce",
"KeyAttributes": {
"PartitionKey": {
"AttributeName": "PK",
"AttributeType": "S"
},
"SortKey": {
"AttributeName": "SK",
"AttributeType": "S"
}
},
"NonKeyAttributes": [
{
"AttributeName": "Username",
"AttributeType": "S"
},
{
"AttributeName": "Fullname",
"AttributeType": "S"
},
{
"AttributeName": "Email",
"AttributeType": "S"
},
{
"AttributeName": "CreatedAt",
"AttributeType": "S"
},
{
"AttributeName": "OrderId",
"AttributeType": "S"
},
{
"AttributeName": "Status",
"AttributeType": "S"
},
{
"AttributeName": "Address",
"AttributeType": "S"
},
{
"AttributeName": "Addresses",
"AttributeType": "M"
}
],
"TableFacets": [
{
"FacetName": "GetUserProfile (A1)",
"KeyAttributeAlias": {
"PartitionKeyAlias": "UserId",
"SortKeyAlias": "ProfileId"
},
"NonKeyAttributes": [
"Username",
"Fullname",
"Email",
"CreatedAt",
"Addresses"
],
"DataAccess": {
"MySql": {}
},
"TableData": []
},
{
"FacetName": "GetOrdersofUser (A2)",
"KeyAttributeAlias": {
"PartitionKeyAlias": "UserId",
"SortKeyAlias": "OrderId"
},
"NonKeyAttributes": [
"Username",
"OrderId",
"Status",
"CreatedAt",
"Address"
],
"DataAccess": {
"MySql": {}
},
"TableData": []
}
],
"DataAccess": {
"MySql": {}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment