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

tar_prql shorthand? #2

Open
daranzolin opened this issue Apr 13, 2024 · 2 comments
Open

tar_prql shorthand? #2

daranzolin opened this issue Apr 13, 2024 · 2 comments
Labels
question Further information is requested

Comments

@daranzolin
Copy link
Owner

No description provided.

@daranzolin
Copy link
Owner Author

Rather than a separate function, this could maybe better work as a separate argument to tar_sql e.g. is_prql = TRUE. Then call prqlr::prql_compile() within source_sql_to_dataframe.

@daranzolin
Copy link
Owner Author

daranzolin commented May 3, 2024

There are several options for implementation.

Option 1: PRQL in .sql files (or .prql files)

Pros: Minimal changes needed to API and code.
Cons: Can't modify and preview query results in RStudio (but could in Visual Studio), no syntax highlighting

Option 2: PRQL in .qmd files

Pros: Can modify and view query results in RStudio.
Cons: Significant changes to underlying code, plus quarto dependency, plus some visual awkwardness:

...
tar_prql(query, "queries/prql_query.qmd")
...

Option 3: Wait until RStudio supports .prql files

Enhancement suggested in rstudio/rstudio#14547
Pros: Minimal changes needed.
Cons: Might never happen

@daranzolin daranzolin added the question Further information is requested label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant