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

Flowmachine query to_sql permissions error #6302

Open
jc-harrison opened this issue Aug 31, 2023 · 0 comments
Open

Flowmachine query to_sql permissions error #6302

jc-harrison opened this issue Aug 31, 2023 · 0 comments
Labels
bug Something isn't working FlowMachine Issues related to FlowMachine

Comments

@jc-harrison
Copy link
Member

The to_sql method of flowmachine queries allows for query results to be stored in a specified table outside of the cache schema. However, the executed SQL always includes ALTER TABLE {full_name} OWNER TO flowmachine; so that cache tables can be removed by the flowmachine cache pruner. This can cause an error when using flowmachine as a library, if a user attempts to write a query result to a table in a schema for which they have write access but do not have permission to change ownership.

I think the best solution here would be to alter table ownership only if the table is created in the cache schema - tables created elsewhere are outside the jurisdiction of flowmachine cache management, so there is no need for them to be owned by flowmachine.

@jc-harrison jc-harrison added bug Something isn't working FlowMachine Issues related to FlowMachine labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FlowMachine Issues related to FlowMachine
Projects
None yet
Development

No branches or pull requests

1 participant