Question
Background
-We are planning to write a boolean value to a column in a table in Snowflake using the Write Table node (JDBC connector).
-The original data is stored in .tsv format in HULFT Square storage, and the boolean value column contains 1 or 0 as a one-byte number.
-When the above .tsv is used for writing, even if the original data is a record of 1, it can be written as FALSE.
Questions
Is the above behavior due to the specification of the JDBC driver? What is the cause and what is the solution?
Answer
The cause of this issue is thought to be due to the JDBC driver specification.
The JDBC driver clearly distinguishes between numeric and boolean data types.
Therefore, the numerical type data from the write source was directly input into the boolean type, resulting in a different behavior from what was expected.
Please use the mapping function to convert the numerical type data that you want to convert into a boolean value before trying to write the data.
For details on the mapping function, please refer to the following manual page.
Document Mapper/Variable Mapper (Basic)
The actual behavior of direct input of numeric types into boolean types follows the JDBC driver specifications.
Please contact your JDBC driver provider to confirm the detailed behavior.
Related FAQs
JDBC Connector - How to set up connection resource and use connector
Comments
0 comments
Article is closed for comments.