Skip to content

Commit

Permalink
Merge pull request #27 from boyney123/catalog-cli-adding-dynamodb-res…
Browse files Browse the repository at this point in the history
…ource

adding new ddb resource on creation of catalog
  • Loading branch information
boyney123 authored Jan 13, 2024
2 parents a94ba02 + d063331 commit 01ac869
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-files-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudcatalog/create-catalog": patch
---

adding new ddb resource on creation of catalog
3 changes: 0 additions & 3 deletions examples/default/data/resources/dynamodb/user-payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ The user-payments table is an integral component of our payment service, designe
### Retrieve User Transaction History
- **Use Case**: Fetch all transactions made by a specific user.
- **Query Pattern**: Query the table using the userId as the partition key. This returns all items with the matching userId, sorted by transactionId.
- **Example Query**: `SELECT * FROM user-payments WHERE userId = :userId`

### Lookup Specific Transaction

- **Use Case**: Retrieve details of a specific transaction for a user.
- **Query Pattern**: Use both userId (partition key) and transactionId (sort key) to get the specific transaction record.
- **Example Query**: `SELECT * FROM user-payments WHERE userId = :userId AND transactionId = :transactionId`

### Query Transactions Based on Status

- **Use Case**: Identify transactions that are pending, successful, or failed.
- **Implementation**: This may require the use of a Global Secondary Index (GSI) with status as the key if frequent queries are made based on the transaction status.
- **Example Query**: `SELECT * FROM user-payments-index-status WHERE status = :status`
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ The user-payments table is an integral component of our payment service, designe
### Retrieve User Transaction History
- **Use Case**: Fetch all transactions made by a specific user.
- **Query Pattern**: Query the table using the userId as the partition key. This returns all items with the matching userId, sorted by transactionId.
- **Example Query**: `SELECT * FROM user-payments WHERE userId = :userId`

### Lookup Specific Transaction

- **Use Case**: Retrieve details of a specific transaction for a user.
- **Query Pattern**: Use both userId (partition key) and transactionId (sort key) to get the specific transaction record.
- **Example Query**: `SELECT * FROM user-payments WHERE userId = :userId AND transactionId = :transactionId`

### Query Transactions Based on Status

- **Use Case**: Identify transactions that are pending, successful, or failed.
- **Implementation**: This may require the use of a Global Secondary Index (GSI) with status as the key if frequent queries are made based on the transaction status.
- **Example Query**: `SELECT * FROM user-payments-index-status WHERE status = :status`
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: users
description: Table for storing user information
service: user-service
owners:
- dboyne
- user-team
AWS:
Arn: arn:aws:dynamodb:us-west-2:123456789123:table/user-payments
TableName: user-payments
CreationDateTime: '2022-09-15T09:56:47.097Z'
DeletionProtectionEnabled: false
TableStatus: ACTIVE
TableSizeBytes: 762
StreamSpecification:
StreamEnabled: true
StreamViewType: NEW_AND_OLD_IMAGES
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
AttributeDefinitions:
- AttributeName: id
AttributeType: S
Service: dynamodb
AccountId: 123456789123
catalog:
updatedAt: '2024-01-10T07:48:19.106Z'
parent: dynamodb
path: users
---

## About this table

The users table is an integral part of our infrastructure, serving as the backbone for managing user data. This table is tailored to support various user-related functionalities across our applications, including authentication, profile management, and user activity tracking. It is optimized for high performance and scalability to handle our growing user base.

## Access patterns

### User Authentication:
- Primary access pattern involves querying by `userID` or `email` to retrieve credentials and perform authentication checks.
- Example Query: Retrieve user details by `email` for login purposes.

### Profile Information Retrieval:

- Frequently accessed for displaying user profile information.
- Example Query: Fetch complete user details by `userID` for profile viewing or editing.

1 comment on commit 01ac869

@vercel
Copy link

@vercel vercel bot commented on 01ac869 Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cloudcatalog-demo – ./packages/cloudcatalog

cloudcatalog-demo-git-main-davidboyne123.vercel.app
cloudcatalog-demo-davidboyne123.vercel.app
cloudcatalog-demo.vercel.app
app.cloudcatalog.dev

Please sign in to comment.