Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julien040/anyquery
Query anything (JSON, Salesforce, GitHub, etc.) with SQL and visualize your data with any MySQL-compatible BI tool.
https://github.com/julien040/anyquery
airtable analytics api business-intelligence csv data-visualization database github go json migration mysql notion parquet pql prql salesforce sql sqlite
Last synced: 3 days ago
JSON representation
Query anything (JSON, Salesforce, GitHub, etc.) with SQL and visualize your data with any MySQL-compatible BI tool.
- Host: GitHub
- URL: https://github.com/julien040/anyquery
- Owner: julien040
- License: other
- Created: 2024-04-06T17:17:25.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-28T18:46:08.000Z (17 days ago)
- Last Synced: 2025-01-04T22:04:32.936Z (10 days ago)
- Topics: airtable, analytics, api, business-intelligence, csv, data-visualization, database, github, go, json, migration, mysql, notion, parquet, pql, prql, salesforce, sql, sqlite
- Language: Go
- Homepage: https://anyquery.dev
- Size: 77.3 MB
- Stars: 508
- Watchers: 4
- Forks: 17
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- my-awesome-list - anyquery - compatible BI tool. | julien040 | 517 | (Go)
- awesome-repositories - julien040/anyquery - Query anything (JSON, Salesforce, GitHub, etc.) with SQL and visualize your data with any MySQL-compatible BI tool. (Go)
README
# Anyquery
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/julien040/anyquery/total)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/julien040/anyquery)
[![Documentation](https://img.shields.io/badge/documentation-blue)](https://anyquery.dev)
[![GitHub issues](https://img.shields.io/github/issues/julien040/anyquery)](https://github.com/julien040/anyquery/issues)
[![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.anyquery.dev%2Fv0%2Fregistry%2F&query=%24.plugins_count&label=Integrations%20count&cacheSeconds=3600)](https://anyquery.dev/integrations/)
[![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.anyquery.dev%2Fv0%2Fquery%2F&query=%24.queries_count&style=flat&label=Queries%20from%20the%20hub&cacheSeconds=3600&link=https%3A%2F%2Fanyquery.dev%2Fqueries)](https://anyquery.dev/queries)
[![Go Reference](https://pkg.go.dev/badge/github.com/julien040/[email protected]/namespace.svg)](https://pkg.go.dev/github.com/julien040/anyquery/namespace)Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying [JSON](https://anyquery.dev/docs/usage/querying-files/#json), [CSV](https://anyquery.dev/docs/usage/querying-files/#csv), [Parquet](https://anyquery.dev/docs/usage/querying-files/#parquet), SQLite, [Airtable bases](https://anyquery.dev/integrations/airtable/), [Google Sheets](https://anyquery.dev/integrations/google_sheets/), [Notion databases](https://anyquery.dev/integrations/notion/), and [log files](https://anyquery.dev/docs/usage/querying-log/) using [Grok](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok.html), among others. It also supports running SQL queries on [remote files](https://anyquery.dev/docs/usage/querying-files/#remote-files) (HTTP, S3, GCS), local apps ([Apple Notes](https://anyquery.dev/integrations/notes/), [Apple Reminders](https://anyquery.dev/integrations/reminders/), [Google Chrome Tabs](https://anyquery.dev/integrations/chrome/), etc.), and databases ([MySQL](https://anyquery.dev/docs/database/mysql/) and [PostgreSQL](https://anyquery.dev/docs/database/postgresql/)). It's built on top of [SQLite](https://www.sqlite.org) and uses [plugins](https://anyquery.dev/integrations/) to extend its functionality.
Moreover, it can act as a [MySQL server](https://anyquery.dev/docs/usage/mysql-server/), allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. [Looker Studio](https://anyquery.dev/connection-guide/looker-studio/), [DBeaver](https://anyquery.dev/connection-guide/dbeaver/), [TablePlus](https://anyquery.dev/connection-guide/tableplus/), [Metabase](https://anyquery.dev/connection-guide/metabase/), etc.).
![Anyquery header](https://anyquery.dev/images/release-header.png)
## Usage
The [documentation](https://anyquery.dev/docs/usage/running-queries) provides detailed instructions on how to run queries with Anyquery.
But let's see a quick example. Type `anyquery` in your terminal to open the shell mode. Then, run the following query:```sql
-- List all repositories of asg017 related to SQLite
SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('asg017') WHERE name LIKE '%sqlite%';-- Count rows of a remote 75MB CSV file
SELECT count(*) FROM read_csv('https://raw.githubusercontent.com/datadesk/california-coronavirus-data/master/latimes-place-totals.csv', header=true);-- Insert into a Notion database all repositories of nalgeon related to SQLite
INSERT INTO notion_database(repo, stars, last_push) SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('nalgeon') WHERE description LIKE '%sqlite%';-- Close all tabs of the datasette documentation
DELETE FROM chrome_tabs WHERE url LIKE '%datasette%';
```You can also launch the MySQL server with `anyquery server` and connect to it with your favorite MySQL-compatible client.
```bash
anyquery server &
mysql -u root -h 127.0.0.1 -P 8070
```## Installation
The [documentation](https://anyquery.dev/docs/#installation) provides detailed instructions on how to install Anyquery on your system. You can install anyquery from Homebrew, APT, YUM/DNF, Scoop, Winget and Chocolatey. You can also download the binary from the [releases page](https://github.com/julien040/anyquery/releases).
### Homebrew
```zsh
brew install julien040/anyquery/anyquery
```### APT
```bash
echo "deb [trusted=yes] https://apt.julienc.me/ /" | sudo tee /etc/apt/sources.list.d/anyquery.list
sudo apt update
sudo apt install anyquery
```### YUM/DNF
```bash
echo "[anyquery]
name=Anyquery
baseurl=https://yum.julienc.me/
enabled=1
gpgcheck=0" | sudo tee /etc/yum.repos.d/anyquery.repo
sudo dnf install anyquery
```### Scoop
```powershell
scoop bucket add anyquery https://github.com/julien040/anyquery-scoop
scoop install anyquery
```### Winget
```powershell
winget install JulienCagniart.anyquery
```### Chocolatey
```powershell
choco install anyquery
```## Plugins
Anyquery is plugin-based, and you can install plugins to extend its functionality. You can install plugins from the [official registry](https://anyquery.dev/integrations) or create your own. Anyquery can also [load any SQLite extension](https://anyquery.dev/docs/usage/plugins#using-sqlite-extensions).
![Integrations](https://anyquery.dev/images/integrations_logo.png)
## License
Anyquery is licensed under the AGPLv3 license for the core engine. The RPC library is licensed under the MIT license so that anyone can reuse plugins in different projects.
The plugins are not subject to the AGPL license. Each plugins has its own license and the copyright is owned by the plugin author.
See the [LICENSE](https://github.com/julien040/anquery/blob/main/LICENSE.md) file for more information.## Contributing
If you want to contribute to Anyquery, please read the [contributing guidelines](https://anyquery.dev/docs/developers/project/contributing). I currently only accept minor contributions, but I'm open to any suggestions or feedback.
You can have a brief overview of the project in the [architecture](https://anyquery.dev/docs/developers/project/architecture/) documentation.