Skip to content

How Can i Consolidate Multiple PRQL Snippets into a Single File? #5113

Answered by aljazerzen
ymolists asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. You can put multiple variable definitions into same .prql file:

# queries.prql

let a = (from x)

let b = (from y)

from z

When compiling them to SQL, you have to provide the "path" to the expression you want compiled:

# prqlc compile queries.prql - a
SELECT * FROM x

# prqlc compile queries.prql - b
SELECT * FROM y

# prqlc compile queries.prql - main
SELECT * FROM z

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ymolists
Comment options

@aljazerzen
Comment options

@ymolists
Comment options

@aljazerzen
Comment options

Answer selected by ymolists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants