In Snowflake JS Stored Procs, ResultSet.getColumnValue() errors when called with a string column name instead of a numeric column index #42
aelyataltruist
started this conversation in
Bugs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
LocalStack for Snowflake — bug report
Environment
localstack start --stack snowflake -dsnowflake-connector-python3.12.1, Python 3.11host="snowflake.localhost.localstack.cloud",port=4566,account="test",user="test",password="test"Summary
In a Snowflake JavaScript stored procedure, calling
ResultSet.getColumnValue()with a column name (string) throws aTypeError, while calling it with a column index (number) on the same result set works fine. Snowflake's docs describegetColumnValue()as accepting either form interchangeably.Steps to reproduce
localstack start --stack snowflake -dsnowflake-connector-python:Expected vs. actual
Expected: Step 4 prints
42, same as step 3 — per Snowflake's docs (https://docs.snowflake.com/en/developer-guide/stored-procedure/stored-procedures-api),getColumnValue()should accept a column index or a column name.Actual: Step 4 raises a
ProgrammingErrorfrom the JS execution sandbox:Notes
I checked the Stored Procedures and Feature Coverage docs pages and didn't see this called out as a known limitation, and didn't find a matching existing GitHub issue — happy to provide more detail or a fuller repro if useful.
Beta Was this translation helpful? Give feedback.
All reactions