Skip to content

DDB Enhanced: table created without indices #1771

Closed
@musketyr

Description

@musketyr

Describe the Feature

DynamoDbTable.createTable() creates the table without global and local indices and there is no way how to obtain the information from TableMetadata

Is your Feature Request related to a problem?

I'm trying to create the DynamoDB table based on DDE Enhanced mappings if it does not exist but the table is created without the indices and I'm not able to get the information without any hacks.

Proposed Solution

  1. minimal solution would be to expose the key set of StaticTableMetadata.indexByNameMap in
    the TableMetadata interface, i.g. TableMetadata.indexNames.
  2. ideal solution is that DynamoDbTable.createTable() will prefill the request with the indices which has been read from the annotations.

Describe alternatives you've considered

I can use reflective access to indexByNameMap but this would be very brittle.

Additional Context

I'm trying to implement DynamoDB declarative services for Micronaut library using v2

https://agorapulse.github.io/micronaut-aws-sdk/#_declarative_services_with_service

This missing feature breaks the parity with the previous version where IDynamoDBMapper.generateCreateTableRequest() method returned the request populated with indices definitions.

  • I may be able to implement this feature request

Your Environment

  • AWS Java SDK version used: 2.11.10
  • JDK version used: 1.8
  • Operating System and version: Darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions