DynamoDB Local trailing zeroes are not be trimmed in Map type.

0

The dynamodb local I used is the latest version, which is 2.4.0.

In dynamodb local latest, the .0 are not trimmed. It should be a bug. local

In dynamodb, the .0 is trimmed. remote

using CLI:

dynamodb local

aws dynamodb get-item \
--table-name test \
--key '{"pk":{"S":"pk"}, "sk":{"S":"sk"}}' \
--endpoint-url "http://localhost:8000"
    "Item": {
        "data": {
            "M": {
                "number": {
                    "N": "1.0"
                }
            }
        },
        "sk": {
            "S": "sk"
        },
        "pk": {
            "S": "pk"
        }
    }
}

dynamodb

aws dynamodb get-item \
--table-name remote-test \
--key '{"pk":{"S":"pk"}, "sk":{"S":"sk"}}'
{
    "Item": {
        "pk": {
            "S": "pk"
        },
        "sk": {
            "S": "sk"
        },
        "data": {
            "M": {
                "number": {
                    "N": "1"
                }
            }
        }
    }
}
L
gefragt vor einem Monat89 Aufrufe
1 Antwort
0

Be sure you are on the latest version of DynamoDB local, as it behaves the same way for me:

Local

aws dynamodb get-item \
--table-name test \
--key '{"PK":{"S":"lhnng"}, "SK":{"S":"lhnng"}}' \
--endpoint-url "http://localhost:8000" 
{
    "Item": {
        "SK": {
            "S": "lhnng"
        },
        "GWP": {
            "N": "1"
        },
        "PK": {
            "S": "lhnng"
        }
    }
}

Web

aws dynamodb get-item \
--table-name test \
--key '{"PK":{"S":"lhnng"}, "SK":{"S":"lhnng"}}' 
{
    "Item": {
        "SK": {
            "S": "lhnng"
        },
        "GWP": {
            "N": "1"
        },
        "PK": {
            "S": "lhnng"
        }
    }
}
profile pictureAWS
EXPERTE
beantwortet vor einem Monat
  • Hi! Thank you for your answer! But your answer has nothing to do with my question, I updated my question and attached some pictures to make it clearer

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen