cashapp / cashapp/tempest

Support for flattening objects

Open
#28 2 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Kotlin
Stars
90
Forks
42
Avg merge
46m
Merged PRs (30d)
1

Description

The official DynamoDB mapper (at least the 2.x one) has a `DynamoDbFlatten` that instructs it to flatten the specified property out into a single row:
```kotlin
@DynamoDbBean
data class BookItem(
@get:DynamoDbPartitionKey
var iban: String?
var name: String? = null,
@get:DynamoDbFlatten
var author: Author? = null
) {
@get:DynamoDbSortKey
var sortKey: String = "book"

@DynamoDbBean
data class Author(
@get:DynamoDbAttribute("authorName")
var name: String? = null,
@get:DynamoDbAttribute("authorNationality")
var nationality: String? = null
)
}
```

It would be nice if Tempest provided either an automatic or manual mapping of these nested types.

Contributor guide

Open the contributing guide

Research direction

The issue does not name repository files, tests, or a mapper entry point; begin by locating Tempest's DynamoDB mapping code and comparing it with the AWS SDK's DynamoDbFlatten annotation described here. Define whether automatic or manual nested-type mapping is in scope, then verify that the BookItem and Author example can be represented as flattened attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kotlin
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.