4 ms·
I don't recall us discussing that before. You can have named pipelines which basically become CTEs, like table employees_usa = (from employees | filter co
by snthpy 4y ago
I don't recall us discussing that before.
You can have named pipelines which basically become CTEs, like
table employees_usa = (from employees | filter country=='USA')
but ultimately there is usually just one "main" pipeline/query per file/input.
Because PRQL only targets queries / DQL at the moment, I'm not sure what the sense multiple pipelines per file would be at this point.
You're welcome to open an issue or start a discussion on the Github repo about your use case though, we'd love to hear about it!
- usgroup 4y agoDoes PRQL allow for a shared library? Ie can fragments be saved and reused?
- snthpy 4y agoThat's definitely on the roadmap but we're not quite there yet. With the next release you will be able to create functions that are reusable pipeline segments (e.g. something like "top 5 items per group"). This works at the moment but is currently undocumented. Do expect there to be breaking changes on this still though as there are some issues around resolving names and namespaces etc... that we still need to work out. There is a (currently rather small) stdlib of functions but beyond that we still need to think about a good way to share code and create reusable libraries.
- usgroup 4y agoI think a composable SQL alternative would be great but if doesn't compose I personally don't see too much value in just an alternative syntax.