Timestream multi-measures support

Hi all! I’m using the latest localstack-pro version (2.1.0) and I’m writing multi-measures records in a timestream table. When I query the measures table, it doesn’t return the measures values. Is it possible the multi-measures feature is not supported ?

This is the timestream-write command:

awslocal timestream-write write-records --database-name test-data-measures --table-name measures --records '[{"Dimensions":[{"Name":"dim_a","Value":"fb2299c6-6b83-418a-b778-9aa74cf534fa"}],"MeasureName":"MY_MEASURE","MeasureValues":[{"Name":"measureValue","Value":"1","Type":"DOUBLE"},{"Name":"start_time","Value":"1684152000000","Type":"TIMESTAMP"}],"MeasureValueType":"MULTI","TimeUnit":"MILLISECONDS","Time":"1684152180000","Version":1686647879684}]'

This is the timestream-query output:

# awslocal timestream-query query --query-string 'select * from test-data-measures.measures' --max-items 1`
`INFO: Environment variable "AWS_DEFAULT_REGION" will be overwritten by "DEFAULT_REGION"

{
    "Rows": [
        {
            "Data": [
                {
                    "ScalarValue": "2023-05-15 12:03:00.000000000"
                },
                {
                    "ScalarValue": "MY_MEASURE"
                },
                {
                    "ScalarValue": "True"
                }
            ]
        }
    ],
    "ColumnInfo": [
        {
            "Name": "time",
            "Type": {
                "ScalarType": "TIMESTAMP"
            }
        },
        {
            "Name": "measure_name",
            "Type": {
                "ScalarType": "VARCHAR"
            }
        },
        {
            "Name": "measure_value::multi",
            "Type": {
                "ScalarType": "MULTI"
            }
        }
    ],
    ...
}

Hello @sannaroby,

We have now implemented initial support for multi-measure records. Please download the latest LocalStack docker image and give it a try.

Hello @Marcel, thanks for your support.
I’ve just tried with the latest localstack-pro version (2.2.0), but I can’t get the measures values.
Now, in the response the “measure_value” column present in the previous version of localstack has disappeared
This is the timestream-query output for the same write command in my first post:

{
    "Rows": [
        {
            "Data": [
                {
                    "ScalarValue": "2023-05-15 12:03:00.000000000"
                },
                {
                    "ScalarValue": "MY_MEASURE"
                },
                {
                    "ScalarValue": "fb2299c6-6b83-418a-b778-9aa74cf534fa"
                }
            ]
        }
    ],
    "ColumnInfo": [
        {
            "Name": "time",
            "Type": {
                "ScalarType": "TIMESTAMP"
            }
        },
        {
            "Name": "measure_name",
            "Type": {
                "ScalarType": "VARCHAR"
            }
        },
        {
            "Name": "dim_a",
            "Type": {
                "ScalarType": "VARCHAR"
            }
        }
    ],
    "QueryId": "135a3c61",
    "QueryStatus": {
        "ProgressPercentage": 100.0,
        "CumulativeBytesScanned": 0,
        "CumulativeBytesMetered": 0
    }
}

Hello @sannaroby,

Please consider using the latest release.
This means to set the localstack/localstack-pro:latest and not just 2.2.0.

docker pull localstack/localstack-pro:latest

Thank you.

Thanks @Marcel,
with the latest docker image, the query for multi-measures records correctly returns the measures values.

1 Like