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
질문됨 23일 전78회 조회
1개 답변
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
전문가
답변함 20일 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠