pacman82/odbc2parquet

What permissions are needed? - State: 42501, Native error: 1, Message: ERROR: permission denied

SamuelMarks opened this issue · 4 comments

$ odbc2parquet query --connection-string 'Driver={PostgreSQL Unicode};Server=localhost;PWD=mypassword;Database=test_user_db;UID=myusername;' ~/Downloads/out.par 'SELECT * FROM test_parquet_to_table;'
2023-08-22T14:42:49-04:00 - WARN - State: 01000, Native error: 0, Message: [unixODBC][Driver Manager]Driver does not support the requested version
2023-08-22T14:42:49-04:00 - WARN - State: 42501, Native error: 1, Message: ERROR: permission denied for table test_parquet_to_table;
Error while executing the query
Error: ODBC emitted an error calling 'SQLExecDirect':
State: 42501, Native error: 1, Message: ERROR: permission denied for table test_parquet_to_table;
Error while executing the query

odbc2parquet is not concerned with permissions in any form. It just forwards the query to the driver manager for execution. If you are able to execute the query with any other tool e.g. dbeaver or plsql odbc2parquet should also be able to execute it. Did you check that the test_user_db has read permission on the table in question.

Yes it works fine in psql

Can not reproduce this.

This is the connection string in the integration tests: Driver={PostgreSQL UNICODE};Server=localhost;Port=5432;Database=test;Uid=test;Pwd=test;

See: https://github.com/pacman82/odbc2parquet/blob/5bf3566336cd0bd26099856f2ab8dee993fa3cb1/tests/integration.rs#L29C24-L34C15

This is how the Postgres is setup in the GitHub workflow:


      postgres:
        image: postgres:13
        ports:
          - "5432:5432"
        env:
          POSTGRES_DB: test
          POSTGRES_USER: test
          POSTGRES_PASSWORD: test

See: https://github.com/pacman82/odbc2parquet/blob/5bf3566336cd0bd26099856f2ab8dee993fa3cb1/.github/workflows/test.yml#L20C1-L28C34

Works fine. As said all permission management is proprietary with this tool. As is the reported status code. You need to check PostgreSQL documentation.

Best, Markus

I am closing this issue. At the moment it is simply not actionable for me. We are even fortunate enough that PostgreSQL is already in the test suite, yet such permission Problems do not show up for me. I would take the error message at face value. Feel free to reopen the issue if you have more information or reply if you found out what caused the permission problem.