Prequel.QueryEngine
0.1.0
See the version list below for details.
dotnet add package Prequel.QueryEngine --version 0.1.0
NuGet\Install-Package Prequel.QueryEngine -Version 0.1.0
<PackageReference Include="Prequel.QueryEngine" Version="0.1.0" />
paket add Prequel.QueryEngine --version 0.1.0
#r "nuget: Prequel.QueryEngine, 0.1.0"
// Install Prequel.QueryEngine as a Cake Addin #addin nuget:?package=Prequel.QueryEngine&version=0.1.0 // Install Prequel.QueryEngine as a Cake Tool #tool nuget:?package=Prequel.QueryEngine&version=0.1.0
Prequel
Prequel is a SQL query engine built in C#. The goal of this project is to demonstrate how query engines are built, and to bring a query engine to the .NET community.
The project contains a step-by-step overview of how a query engine is built. The project is also available as a NuGet package and can be integrated into your project to support querying virtually any source where data can be collected.
The project contains several example data sources including CSV, Avro, Parquet, JSON, MS Sql, etc.. Adding new data sources is trivial and allows any data source to be queried with SQL, even querying data across disparate sources (e.g. join JSON to CSV or tables in a RDBMS instance).
Run the Test Project
Open the source code in your IDE of choice. Set the Prequel.Console as the startup project and/or compile the project and run.
Visual Studio
- Set Prequel.Console as the startup project and run the project
VS Code
- Use the included launch profile, run from the "RUN AND DEBUG" window
CLI
Open a terminal to the projects root
cd Tests/Prequel.Console dotnet run
What is a Query Engine?
A query engine is software that interprets a query (Structured Query Language) and interacts with a data source to manipulate the underlying data. Take a look at the full project overview for details on how every part of a query engine works.
Main Features
- Simple π€²: Query engines are not simple by nature. However this project uses the lowest common denominator approach to standardize unrelated data sources and data types (e.g. JSON vs CSV).
- Extensible π§©: Plug in any data source. All runtime data is queried from your data source under your control.
- Caching π΅: In-memory and durable caching options make it simple to control how and when your data source is read.
- Open Source π: All code and features are available, transparent, and free to use.
- Performant ποΈ: Queries are optimized before execution on a minimum-data-needed approach to reading data. Only the data required is read from data sources, even across unrelated sources. Profiling is built into the engine.
Motivation
This project contains a full overview of how query engines are built. Part of the goal with this project is to demonstrate the mechanics of a query engine. Chances are you use some form of database, BI tool, or ETL process as part of your daily development. While the code here is fully functional, itβs also academic in the sense that it gives a full picture of how data is gathered, aggregated, sorted, filtered, and so on, by your favorite data engine. Whether Postgres, MySql, BigQuery, Snowflake, or any of the dozens of database systems or cloud-hosted data platforms.
Contribution
Contributions are what make open-source work. We greatly appreciate any contributions. Thank you for being a part of our community! π₯°
Sponsorship
If you find Prequel useful, or the tutorial helpful, please consider sponsoring us. Your support will help the project continue to grow.
β Your Name Here β ifyou become a sponsor.
<a href="https://buymeacoffee.com/tylerbrinks" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
Other Projects
C# SqlParser - SQL Grammar Parser
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- SqlParserCS (>= 0.5.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.2 | 80 | 12/2/2024 |
0.1.2-release0000 | 61 | 12/2/2024 |
0.1.1 | 85 | 11/29/2024 |
0.1.1-release0000 | 68 | 11/29/2024 |
0.1.0 | 79 | 11/29/2024 |