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

run a query using a string #1037

Open
raybellwaves opened this issue Oct 8, 2024 · 0 comments
Open

run a query using a string #1037

raybellwaves opened this issue Oct 8, 2024 · 0 comments

Comments

@raybellwaves
Copy link

What happens?

I try to write queries using f-strings because I setup auth in s3 like

query = f"""
SET TIMEZONE='UTC';
CREATE SECRET s3_secret (
    TYPE S3,
    KEY_ID '{aws_creds.access_key}',
    SECRET '{aws_creds.secret_key}',
    SESSION_TOKEN '{aws_creds.token}'
);
PRAGMA enable_print_progress_bar;
SET TIMEZONE='UTC';
CREATE TABLE tbl AS SELECT *
FROM read_parquet('s3://BUCKET/DATA.parquet/*/*.parquet');
"""

How can I then pass this to %sql ?

To Reproduce

NA

OS:

macOS

JupySQL Version:

0.10.14

Full Name:

Ray Bell

Affiliation:

Self

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

1 participant