Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python snowflake adbc_ingest "<Table>does not exist or not authorized" #2545

Open
aschreiber1 opened this issue Feb 22, 2025 · 1 comment
Open
Labels
Type: bug Something isn't working

Comments

@aschreiber1
Copy link

What happened?

I have permissions to insert into a table, but it appears i cant used adbc_ingest to append into the table as well, as I get does not exist or not authorised exception. I have the create stage permissions that the documentations say you need.

cursor.execute("Create table my_test (SECURITYID NUMBER)")

table = pa.table({
'SECURITYID': pa.array([1001, 1002, 1003, 1004, 1005], type=pa.int64())
})

//this works
for row in table.to_pylist():
cursor.execute(
"INSERT INTO my_test (SECURITYID) VALUES (?)",
(row['SECURITYID'],)
)

//this does not work
res = cursor.adbc_ingest("my_test", table, mode="append")

time="2025-02-22T01:45:56Z" level=error msg="error: 002003 (42S02): SQL compilation error:\nObject '"my_test2"' does not exist or not authorized." func="gosnowflake.(*snowflakeConn).queryContextInternal" file="connection.go:413"

Stack Trace

No response

How can we reproduce the bug?

time="2025-02-22T01:45:56Z" level=error msg="error: 002003 (42S02): SQL compilation error:\nObject '"my_test2"' does not exist or not authorized." func="gosnowflake.(*snowflakeConn).queryContextInternal" file="connection.go:413"

Environment/Setup

python snowflake driver, ive tried with both 1.3 and 1.4 and same issue

@aschreiber1 aschreiber1 added the Type: bug Something isn't working label Feb 22, 2025
@aschreiber1
Copy link
Author

aschreiber1 commented Feb 22, 2025

Looks to me like the issue is that the select query it generates is:
SELECT COUNT(*) FROM IDENTIFIER('"my_test2"')

But those double quotes should not be there, not sure how this works for anybody?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant