runreveal / pql Goto Github PK
View Code? Open in Web Editor NEWPipelined Query Language
Home Page: https://pql.dev
License: Apache License 2.0
Pipelined Query Language
Home Page: https://pql.dev
License: Apache License 2.0
Not sure if expected or not. I want to do some post-processing of columns that are selected.
runreveal_logs
| project toLower(eventName), notEmpty(eventName)
| limit 5
Are things like this currently supported? I couldn't quite figure out if they were or not with another syntax. This way I'm currently doing it I get this error:
pql: parse pipeline query language: 2:26: expected '|', got '('
pql: one or more statements could not be compiled
Keeping an issue open here to decide on the language/repository name and rename things as appropriate.
Needed for #8
From @abraithwaite:
Support for map column type would be helpful I think. Not sure the best way to do this, but the syntax for a map key access is:
mapcol['strkey']
.
In other projects, I use Nix to manage the CI steps (example). This guarantees that running nix flake check
locally reproduces the CI build exactly, but puts Nix in a more prominent place in the build process, which may not be desirable.
Alternatively, we could use Nix just as a package manager and use it to install Clickhouse (or possibly Go as well) in CI.
The let
operator allows users to assign variables to be used in queries. Example follows.
let n = 10; // number
let place = "Dallas"; // string
let cutoff = ago(62d); // datetime
Events
| where timestamp > cutoff
and city == place
| take n
Kusto docs:
https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/let-statement
Not sure what the best way to approach this problem is, but support for an LSP would be huge for obvious reasons.
Theoretically, this should be more straight forward than SQL because we have better context at the point of typing.
That is, context flows through the pipe, versus SQL SELECT a, b, c FROM X
where we don't know the possible values for a, b, or c until the table X is specified.
Since we're already extracting CTEs anyway, we can just have a no-op that captures aliases at particular points of a pipeline.
We should figure out how to support parameterized queries for databases.
They have various distinct ways of being implemented that we should be able to support
We may be able to use the passthrough mechanisms plus some side-channel loading of parameters somehow, as an idea.
Somewhat a combination of function and binary operators, since the syntax is x in (y, z, ...)
.
From @ejcx:
One thing that might be helpful to add [...] is a CONTRIBUTING.md and information on the general how to add new operators and translation target syntaxes.
Ensures correctness of generated queries beyond the manual review required in #3.
true
false
null
Part of #5
Used to detect regressions in SQL output as changes are made. Should support a record mode.
How can we validate the generated query. For e.g.
Allowed Databases, Allowed Tables, Allowed Fields specific to each Table, on Where conditions checking for certain conditions, on limits checking the min and max limit value that the user can pass etc
If the user will be writing the query in PQL format. We want to validate for valid tables, but also limit the way the user queries instead of allowing them to query everything.
count
tabular operatorwhere
tabular operatortake
tabular operatorproject
tabular operatorsummarize
tabular operatorsort
tabular operatorThis seems very similar to the effort done by the PRQL team.
How does this project differ and have you considered joining forces instead of creating a new SQL competitor.
Syntax for ["foo"]
or ['foo']
. Details
Part of #5.
There are some extra string operators that have a variety of keywords and forms that can be investigated.
To preserve evaluation order, I'm inserting parentheses around all binary operators. However, for subexpressions that do not contain another binary operator in the resulting SQL, these parentheses are unnecessary.
Equivalent to sort by x | take y
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.