Open clajiness-cp opened 3 months ago
Hi, all.
Whenever I attempt to use bind variables, I receive a 422 from Snowflake. I even tested this with your example code, and a bunch of other permutations. Is anyone else seeing this behavior?
RubySnowflake::BadResponseError (Bad response! Got code: 422, w/ message { "code" : "002040", "message" : "SQL compilation error:\nUnsupported data type 'null'.", "sqlState" : "42601", "statementHandle" : "01b68b2b-0308-1315-0026-658704ef8e0a" }):
I'd provide sample code, but it's literally the same as in your example.
json_string = '{"valid": "json"}' query = "insert into BIGTABLE(data) select parse_json(?)" bindings = { "1": { "type": "TEXT", "value": json_string } } client.query(query, bindings: bindings)
Thanks much!
Using a hash worked for me:
bindings = { "1" => { "type" => "TEXT", "value" => "Other Event" } }
Hi, all.
Whenever I attempt to use bind variables, I receive a 422 from Snowflake. I even tested this with your example code, and a bunch of other permutations. Is anyone else seeing this behavior?
I'd provide sample code, but it's literally the same as in your example.
Thanks much!