Aurora

Quickstart Guides

Build analytics project from Clickhouse

Quickstart: Analytics engineering project from Clickhouse Playground or your own Clickhouse database

This will walk you through creating a new local Moose project reflecting the structure of your Clickhouse database. It will allow you to add data to your local dev environment from your remote Clickhouse database, and use Aurora MCP tools to enrich your project with metadata, or create new Moose primitives that you can use in your project (e.g.egress APIs). We’ll use the Clickhouse Playground as our example database, but you can use any Clickhouse database.

Prerequisites

Install Moose and Aurora CLIs

Terminal
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) moose,aurora

We’ll be using generative MCP tools here, so make sure you add your Anthropic API key in install. If you installed without adding it, you can add it later with aurora config keys anthropic <your-api-key>. If you need to create one, see: https://docs.anthropic.com/en/docs/initial-setup.

Create a new Moose project from your Clickhouse database

Terminal
aurora init my_project_name --from-remote 'https://explorer:@play.clickhouse.com:443/?database=default' --language python --mcp cursor-project

Try with ClickHouse Playground

Want to test without your own ClickHouse? Use the ClickHouse Playground with the connection string above. It has sample datasets (read-only) you can experiment with.

https://explorer:@play.clickhouse.com:443/?database=default

This will create a new Moose project from your Clickhouse database. See Moose docs for more information about the project structure, and how it spins up your local development environment (including a local Clickhouse database).

The new project is called “my_project_name” and is created in the current directory. the string after --from-remote is the connection string to your Clickhouse database, structured as clickhouse://<username>:<password>@<host>:<port>/<database> (note, the Clickhouse Playground has no password).

Install dependencies and run the dev server

Before you can run Moose’s local dev server, Docker Desktop must be running.

Navigate into the project directory:

Terminal
cd my_project_name

Install the dependencies:

Terminal
npm i

Run the dev server:

Terminal
moose dev

Get sample data

Terminal
moose seed clickhouse --connection-string clickhouse://explorer:@play.clickhouse.com/default --limit 100

This will seed your local Clickhouse database with 100 rows of sample data from your remote Clickhouse database—here, the Clickhouse Playground. You can change the number of rows with the --limit flag.

This will improve the context provided to Aurora’s MCP tools, and make it easier to validate analytic engineering tasks.

Set up your Client

The aurora init command above configured Cursor to use Aurora MCP tools. You can check this by opening Cursor and looking at cursor > settings > cursor settings > MCP menu. You should see aurora in the list of MCPs, alongside a list of tools.

You may need to enable the MCP. Once you do so, you should see a green 🟢 status indicator next to it.

If you would like to use a different client, you can use the following command from within the project directory:

Terminal
aurora setup --mcp <host>

Enrich project with metadata [coming soon]

Since we have a Moose project with sample data and some metadata, we can use this to create more metadata!

If we ask our client “Can you add a description to each Moose primitive in this project?”, the LLM will use the write_metadata tool to add a description to each Moose primitive.

my_project_name/index.ts
const acPipeline = new IngestPipeline<AircraftTrackingProcessed>(
    "AircraftTrackingProcessed",
    {
      table: true,
      stream: true,
      ingest: false,
      metadata: {
          description: "Pipeline for ingesting raw aircraft data" } // new description field!
      }
    
);

Chat with your data

You can also now just chat with your client about your data! Try asking “Look at my MTA data in clickhouse, tell me about the trains that ran in the last 24 hours.”

The client will use read_moose_project, read_clickhouse_tables and maybe read_production_clickhouse to answer your question.

Create new Egress APIs with Aurora MCP tools

If you find a thread that you find interesting enough to want to productionize, try asking the client “can you create an egress API to furnish that data?”

The client will use create_egress_api and test_egress_api to create an egress API primitives in Moose, that will automatically deploy in your local dev environment when you save.

Other Quickstart Guides