Skip to content

PromQL (the Prometheus Query Language) on top of SQL Databases to query them like a time-series database

License

Notifications You must be signed in to change notification settings

adavoudi/PromSQL

Repository files navigation

PromSQL: PromQL on top of SQL

This project implements the PromQL lamguage on top of SQL databases in order to query them with a timeseries query language. This way, we can query already existing data in SQL databases as if they are stored in a timeseries database like Prometheus.

Tasks:

  • Implement the PromQL grammar in LARK
  • Implement fetching data from the SQL database using sqlalchemy
  • Implement all nodes
  • Implement config manager

How to use?

First run the docker-compose file:

docker-compose up

Then push some data in the QuestDB database using

pip install -r requirements.txt
pip install -e .
promsql-cli.py

Then in the opened command prompt, enter the following:

promsql > telemetry[5m]

This will get all the telemety metric values since the last 5 minitues.

How to change the configs

Right now, the only way to change the configs is changing the values in the promsql/constants.py file.

About

PromQL (the Prometheus Query Language) on top of SQL Databases to query them like a time-series database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages