Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MS SQL quick start #192

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,42 @@ instances are accessible from within Spice to demonstrate that you can query acr

## Steps

1. Start the MSSQL instances using `docker compose up -d`. In a production scenario you'd want to use [secrets](https://docs.spiceai.org/components/secret-stores) to protect your secrets
2. Start up Spice using `spice run`
3. In another shell, fire up the Spice SQL REPL using `spice sql`
1. Clone the Spice quickstarts repository and navigate to the `mssql` directory:

```shell
git clone https://github.com/spiceai/quickstarts.git
cd quickstarts/mssql
```
2. Start the MSSQL instances using `docker compose up -d`. In a production scenario you'd want to use [secrets](https://docs.spiceai.org/components/secret-stores) to protect your secrets
3. Start up Spice using `spice run`

```shell
Checking for latest Spice runtime release...
Spice.ai runtime starting...
2024-09-23T19:43:29.074453Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-09-23T19:43:29.074284Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-09-23T19:43:29.075193Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-09-23T19:43:29.091737Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-09-23T19:43:29.274085Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-09-23T19:43:29.280949Z WARN tiberius::client::tls_stream::rustls_tls_stream: Trusting the server certificate without validation.
2024-09-23T19:43:29.281023Z WARN tiberius::client::tls_stream::rustls_tls_stream: Trusting the server certificate without validation.
2024-09-23T19:43:29.281987Z WARN tiberius::client::tls_stream::rustls_tls_stream: Trusting the server certificate without validation.
2024-09-23T19:43:29.296410Z INFO runtime: Dataset sales.customer registered (mssql:Sales.Customer), acceleration (arrow), results cache enabled.
2024-09-23T19:43:29.296456Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset sales.customer
2024-09-23T19:43:29.298284Z INFO runtime: Dataset sales.customer2022 registered (mssql:Sales.Customer), acceleration (arrow), results cache enabled.
2024-09-23T19:43:29.298383Z INFO runtime: Dataset sales.salesorderheader registered (mssql:Sales.SalesOrderHeader), acceleration (arrow), results cache enabled.
2024-09-23T19:43:29.299097Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset sales.salesorderheader
2024-09-23T19:43:29.299104Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset sales.customer2022
2024-09-23T19:43:29.374935Z INFO runtime::accelerated_table::refresh_task: Loaded 19,820 rows (2.20 MiB) for dataset sales.customer in 78ms.
2024-09-23T19:43:29.387697Z INFO runtime::accelerated_table::refresh_task: Loaded 19,820 rows (2.20 MiB) for dataset sales.customer2022 in 88ms.
2024-09-23T19:43:29.394271Z INFO runtime::accelerated_table::refresh_task: Loaded 31,465 rows (7.19 MiB) for dataset sales.salesorderheader in 95ms.
```
4. In another shell, fire up the Spice SQL REPL using `spice sql`
```shell
Welcome to the Spice.ai SQL REPL! Type 'help' for help.

show tables; -- list available tables
```

## Example Queries

Expand Down Expand Up @@ -78,4 +111,4 @@ Output:
| 11276 | 2014-06-24 | 40.45 | 27 |
| 11200 | 2014-06-22 | 59.89 | 27 |
+------------+-----------------+-------------------+---------------------+
```
```
Loading