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

Any way to execute commands prior to query? #654

Open
mcrumiller opened this issue Jun 21, 2024 · 2 comments
Open

Any way to execute commands prior to query? #654

mcrumiller opened this issue Jun 21, 2024 · 2 comments

Comments

@mcrumiller
Copy link

I need to be able to execute a command prior to sql query, as in the following:

set optimizer = 'on';
SELECT * FROM my_table;

Since connectorx creates and destroys a new connection upon each query, is there any way to supply a set of execute instructions prior to the query that are session-specific?

@surister
Copy link
Contributor

There is currently no:

  • setup query as in a query that gets run before connectorx's
  • teardown query as in a query that gets run after connectorx's

You can manually pass the queries to read_sql but you'd have to take care of the partitions yourself

@WilliamStam
Copy link

im also looking for a solution to this. need to be able to ALTER SESSION SET CURRENT_SCHEMA = XYZ before the queries. changing the username to the schema isnt possible :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants