Skip to content

Commit

Permalink
updated quickstart (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
beforan authored Mar 4, 2025
1 parent e06aab2 commit 21ffa01
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions website/pages/bunny/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ curl -O https://raw.githubusercontent.com/Health-Informatics-UoN/hutch/refs/head

Or manually saving it to a file `bunny-demo.compose.yml`

### Run the Compose file
### Get the Demo Availability Query

This will start the database, initialise it with a synthetic OMOP CDM dataset, and run a query against it.
Download the [sample Availability Query](https://raw.githubusercontent.com/Health-Informatics-UoN/hutch-bunny/refs/heads/main/tests/queries/availability/availability.json)

For simplicity, ensure the file is next to the Compose file from Step 1.

```bash copy
docker compose -f bunny-demo.compose.yml run bunny bunny --body tests/queries/availability/availability.json
curl -O https://raw.githubusercontent.com/Health-Informatics-UoN/hutch-bunny/refs/heads/main/tests/queries/availability/availability.json
```

This will take a minute or so to download the images and start the containers.
Or manually saving it to a file `availability.json`

The query file is a JSON file that contains the query to run, which is a simple cohort definition, querying the `Person` table for `8507`.

Expand Down Expand Up @@ -65,6 +67,26 @@ The query file is a JSON file that contains the query to run, which is a simple
}
```

<Callout emoji="👍">
You can also provide your own Availability Query to run via the Bunny CLI.
</Callout>

### Run the Compose file

This will start the database, initialise it with a synthetic OMOP CDM dataset, and run a query against it.

Note that we also need to bind mount a docker volume so the Bunny container can access the input query.

```bash copy
docker compose -f bunny-demo.compose.yml \
run \
-v "$(pwd)"/availability.json:/var/queries/availability.json:ro \
bunny bunny \
--body /var/queries/availability.json
```

This will take a minute or so to download the images and start the containers.

<Callout emoji="🎉">Congratulations on your first Bunny query!</Callout>

### View the results
Expand Down

0 comments on commit 21ffa01

Please sign in to comment.