Skip to content

Overview

stars

What is anyquery about ?

Anyquery allows you to write SQL queries on pretty much any data source. It is a query engine that can be used to query data from different sources like databases, APIs, and even files. For example, you can use a Notion database or a Google Sheet as a database to store your data.

Example

Let’s use the Google Sheets plugin to query data from a Google Sheet. Once you have followed the instructions to connect your Google Sheet, you can run the following queries. Anyquery will infer the schema of the Google Sheet and allow you to query it using SQL.

Open a new SQL shell by running the following command:

Terminal window
anyquery

Now, you can run the following queries:

-- Observe the infered schema
DESCRIBE google_sheets_table;
-- Query data from a Google Sheet
SELECT * FROM google_sheets_table;
-- Insert a new row in a Google Sheet
INSERT INTO google_sheets_table (name, age) VALUES ('John', 25);

Why use Anyquery ?

As a import/export tool

Anyquery can be used as an import/export tool to move data between different data sources. For example, you can use Anyquery to import data from an Airtable database into a Google Sheet. You can also use Anyquery to export data from a Google Sheet into a JSON file.

As a data exploration tool

Anyquery can be used as a MySQL server. It means you can connect your favorite BI tool to Anyquery and run SQL queries on your data. Let’s say you track your customers with Notion, you can connect your BI tool to Anyquery and run SQL queries on your Notion database.

As a data transformation tool

Anyquery can be used to transform data from one format to another. For example, you can use Anyquery to transform a CSV file into a JSON file. And with the powerful SQLite ecosystem, use hundreds of functions to transform your data.

How does it work ?

Anyquery wraps SQLite and uses the virtual table mechanism to connect to different data sources. It also provides a MySQL compatibility layer that rewrites your MySQL queries to the SQLite format on the fly and use the MySQL wire protocol to communicate with your favorite SQL clients.