apache / arrow-adbc

Database connectivity API standard and libraries for Apache Arrow
https://arrow.apache.org/adbc/
Apache License 2.0
381 stars 94 forks source link

go/adbc/driver/snowflake: add option for unquoted table name #1766

Open lidavidm opened 6 months ago

lidavidm commented 6 months ago

What feature or improvement would you like to see?

Based on #1721 and #1738 I think we can add an option like adbc.snowflake.sql.unsafe_disable_table_name_quoting to let you pass an unquoted table name to ingestion APIs, for power users who have pre-escaped table names.

zeroshade commented 6 months ago

It was suggested by @davlee1972 that we name it adbc.snowflake.sql.unsafe_disable_quoted_identifiers instead since "quoted_identifiers" is a common term / commonly used in various database driver utilities. I'm okay with this naming if others are

davlee1972 commented 6 months ago

Sorry for the back and forth.. I think it should called "quote_identifiers" = True by default..

This is a common term used across database products and with common understanding..

A quoted identifier begins and ends with double quotation marks (").

https://www.postgresql.org/docs/current/sql-syntax-lexical.html There is a second kind of identifier: the delimited identifier or quoted identifier. It is formed by enclosing an arbitrary sequence of characters in double-quotes (").

https://docs.oracle.com/cd/B10500_01/server.920/a96540/sql_elements9a.htm Every database object has a name. In a SQL statement, you represent the name of an object with a quoted identifier or a nonquoted identifier.

https://docs.snowflake.com/en/sql-reference/identifiers-syntax To work around this limitation, Snowflake provides the QUOTED_IDENTIFIERS_IGNORE_CASE session