This guide follows the Console getting started tutorial: create a Space, ingest a JSON event, wait for transformation, and query records from ClickHouse.

Quick Start Snapshot

Prerequisites

1. Create a Space

  1. Open the TrailStack Console.
  2. Go to the Spaces page.
  3. Click Create.
  4. Enter a space name (for example, my-app-events).
  5. Click Create space.

Your Space is the pipeline that transforms incoming JSON events into typed SQL tables backed by ClickHouse.

Success check:

2. Collect Credentials and Endpoints

On the result page, copy these values:

Recommended first:

Optional:

Note:

3. Ingest a Test Event

Recommended:

Template (for scripting):

source .my-app-events.env

curl -X POST "https://api.trailstack.io/v1/Spaces/AppendRecords?spaceName=$TRAILSTACK_SPACE_NAME&fireAndForget=false" \
  -H "Authorization: Bearer $TRAILSTACK_INJECT_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary '{"source":"example","event":"test_event","attrs":{"str":"Hello TrailStack!"}}'

Success check:

4. Wait for Transformation

TrailStack transforms JSON into typed SQL tables. This usually takes a couple of minutes.

Success check:

5. Query Data as SQL

Recommended:

Template (for scripting):

source .my-app-events.env

curl -X POST "https://api.trailstack.io:8443?database=$TRAILSTACK_CLICKHOUSE_DB" \
  -u "$TRAILSTACK_CLICKHOUSE_USER:$TRAILSTACK_CLICKHOUSE_PASSWORD" \
  -d "SELECT * FROM evt__records LIMIT 10 FORMAT Pretty"

Success check:

6. Complete Setup

Click Complete to return to the Spaces list.

You can reopen the Space later to view endpoint and connection details.

Troubleshooting

Next Steps