embucket-labs icon indicating copy to clipboard operation
embucket-labs copied to clipboard

SQL result failure: SELECT CURRENT_TIMESTAMP

Open YaroslavLitvinov opened this issue 3 months ago • 2 comments

SQL: SELECT CURRENT_TIMESTAMP

queryResultForma": "json"

Executed with snow sql on Snowflake

+----------------------------------+
| CURRENT_TIMESTAMP                |
|----------------------------------|
| 2025-09-18 04:15:44.315000-07:00 |
+----------------------------------+

Executed with snow sql / snowsql on Embucket

Failed to convert: field now(): TIMESTAMP_TZ::1758195045.666605358, Error: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/home/user/venv/lib/python3.13/site-packages/snowflake/connector/result_batch.py", line 531, in _parse
    row_result[idx] = v if c is None or v is None else c(v)
                                                       ~^^^
  File "/home/uservenv/lib/python3.13/site-packages/snowflake/connector/converter.py", line 252, in conv
    value, tz = encoded_value.split()
    ^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

Raw result from Embucket server:

{
    "data": {
        "rowtype": [{
            "name": "now()",
            "database": "",
            "schema": "",
            "table": "",
            "nullable": false,
            "type": "timestamp_tz",
            "byteLength": null,
            "length": null,
            "scale": 9,
            "precision": 0,
            "collation": null
        }],
        "rowsetBase64": null,
        "rowset": [
            ["1758194949.865506315"]
        ],
        "total": 1,
        "queryResultFormat": "json",
        "sqlState": "02000",
        "queryId": "00000000-0000-0000-0000-077ef1dcc187"
    },
    "success": true,
    "message": "successfully executed",
    "code": null
}

YaroslavLitvinov avatar Sep 18 '25 11:09 YaroslavLitvinov

What about the arrow format?

DanCodedThis avatar Sep 18 '25 13:09 DanCodedThis

What about the arrow format?

I didn't check arrow

YaroslavLitvinov avatar Sep 19 '25 00:09 YaroslavLitvinov