Skip to content

Commit

Permalink
Update docs to reference cookbook (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipleblanc authored Dec 19, 2024
1 parent a95b89a commit 0a7ac95
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 62 deletions.
2 changes: 1 addition & 1 deletion spiceaidocs/docs/api/tls/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pagination_next: null

## Pre-requisites

A valid TLS certificate and private key in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format are required. To generate certificates for testing, follow the [TLS Sample](https://github.com/spiceai/samples/tree/trunk/tls).
A valid TLS certificate and private key in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format are required. To generate certificates for testing, follow the [TLS Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/tls).

## Enable TLS via command line arguments

Expand Down
8 changes: 4 additions & 4 deletions spiceaidocs/docs/clients/superset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Select the appropriate tab based on whether you are experimenting with this feat

<Tabs>
<TabItem value="experimenting" label="Experimenting" default>
The easiest way to connect Apache Superset and Spice is to follow the [`Sales BI` sample](https://github.com/spiceai/samples/tree/trunk/sales-bi). This sample builds a local Docker image based on Apache Superset that is pre-configured with the `flightsql-dbapi` library needed to connect to Spice.
The easiest way to connect Apache Superset and Spice is to follow the [`Sales BI` Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/sales-bi). This recipe builds a local Docker image based on Apache Superset that is pre-configured with the `flightsql-dbapi` library needed to connect to Spice.

Clone the Spice samples repository and navigate to the `sales-bi` directory:
Clone the Spice cookbook repository and navigate to the `sales-bi` directory:

```bash
git clone https://github.com/spiceai/samples.git
cd samples/sales-bi
git clone https://github.com/spiceai/cookbook.git
cd cookbook/sales-bi
```

Start Apache Superset along with the Spice runtime in Docker Compose:
Expand Down
6 changes: 3 additions & 3 deletions spiceaidocs/docs/components/data-connectors/debezium.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ The following settings are required:

### Example

See an example of configuring a dataset to use CDC with Debezium by following the sample [Streaming changes in real-time with Debezium CDC](https://github.com/spiceai/samples/tree/trunk/cdc-debezium).
See an example of configuring a dataset to use CDC with Debezium by following the Cookbook Recipe [Streaming changes in real-time with Debezium CDC](https://github.com/spiceai/cookbook/tree/trunk/cdc-debezium#readme).

An example of configuring [SASL authentication over SSL](https://github.com/spiceai/samples/tree/trunk/cdc-debezium/sasl-scram) is available as well.
An recipe of configuring [SASL authentication over SSL](https://github.com/spiceai/cookbook/tree/trunk/cdc-debezium/sasl-scram#readme) is available as well.

## Secrets

Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the [secret stores documentation](/components/secret-stores). Additionally, learn how to use referenced secrets in component parameters by visiting the [using referenced secrets guide](/components/secret-stores#using-secrets).
Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the [secret stores documentation](/components/secret-stores). Additionally, learn how to use referenced secrets in component parameters by visiting the [using referenced secrets guide](/components/secret-stores#using-secrets).
4 changes: 2 additions & 2 deletions spiceaidocs/docs/components/data-connectors/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ datasets:
file_format: parquet
```

## Quickstarts and Samples
## Cookbook

Refer to the [File quickstart](https://github.com/spiceai/quickstarts/tree/trunk/file) to see an example of the File connector in use.
Refer to the [File cookbook recipe](https://github.com/spiceai/cookbook/tree/trunk/file) to see an example of the File connector in use.
6 changes: 3 additions & 3 deletions spiceaidocs/docs/components/data-connectors/ftp.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ SELECT COUNT(*) FROM cool_dataset;
hive_partitioning_enabled: false
```

## Quickstarts and Samples
## Cookbook

Refer to the [FTP quickstart](https://github.com/spiceai/quickstarts/tree/trunk/ftp) to see an example of the FTP connector in use.
Refer to the [FTP cookbook recipe](https://github.com/spiceai/cookbook/tree/trunk/ftp) to see an example of the FTP connector in use.

## Secrets

Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the [secret stores documentation](/components/secret-stores). Additionally, learn how to use referenced secrets in component parameters by visiting the [using referenced secrets guide](/components/secret-stores#using-secrets).
Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the [secret stores documentation](/components/secret-stores). Additionally, learn how to use referenced secrets in component parameters by visiting the [using referenced secrets guide](/components/secret-stores#using-secrets).
2 changes: 1 addition & 1 deletion spiceaidocs/docs/components/data-connectors/odbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ datasets:
odbc_connection_string: Driver={PostgreSQL Unicode};Server=localhost;Port=5432;Database=spice_demo;Uid=postgres
```

See the [ODBC Quickstart](https://github.com/spiceai/quickstarts/blob/trunk/odbc/README.md) for more help on getting started with ODBC and Postgres.
See the [ODBC Cookbook Recipe](https://github.com/spiceai/cookbook/blob/trunk/odbc/README.md) for more help on getting started with ODBC and Postgres.

## Secrets

Expand Down
2 changes: 1 addition & 1 deletion spiceaidocs/docs/components/embeddings/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ embeddings:
Refer to the [Azure OpenAI Service models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) for more details on available models and configurations.
Follow [Quickstart: Using Azure OpenAI models](https://github.com/spiceai/quickstarts/tree/trunk/azure_openai) to try Azure OpenAI models for vector-based search and chat functionalities with structured (taxi trips) and unstructured (GitHub files) data.
Follow the [Azure OpenAI Models Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/azure_openai) to try Azure OpenAI models for vector-based search and chat functionalities with structured (taxi trips) and unstructured (GitHub files) data.
2 changes: 1 addition & 1 deletion spiceaidocs/docs/components/models/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ models:
Refer to the [Azure OpenAI Service models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) for more details on available models and configurations.
Follow [Quickstart: Using Azure OpenAI models](https://github.com/spiceai/quickstarts/tree/trunk/azure_openai) to try Azure OpenAI models for vector-based search and chat functionalities with structured (taxi trips) and unstructured (GitHub files) data.
Follow the [Azure OpenAI Models Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/azure_openai) to try Azure OpenAI models for vector-based search and chat functionalities with structured (taxi trips) and unstructured (GitHub files) data.
2 changes: 1 addition & 1 deletion spiceaidocs/docs/features/cdc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Currently, the only supported data connector is [Debezium](/components/data-conn

## Example

See an example of configuring a dataset to use CDC with Debezium by following the sample at [Streaming changes in real-time with Debezium CDC](https://github.com/spiceai/samples/tree/trunk/cdc-debezium).
See an example of configuring a dataset to use CDC with Debezium by following the recipe at [Streaming changes in real-time with Debezium CDC](https://github.com/spiceai/cookbook/tree/trunk/cdc-debezium#readme).

```yaml
version: v1beta1
Expand Down
2 changes: 1 addition & 1 deletion spiceaidocs/docs/features/data-acceleration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Locally accelerated datasets can also have [primary key constraints](./constrain

## Example Use Case

Consider a high-volume e-trading frontend application backed by an AWS RDS database containing a table of trades. To retrieve all trades over the last 24 hours, the application would need to query the remote database and transfer the data over the network. By accelerating the trades table locally using the [AWS RDS Data Connector](https://github.com/spiceai/quickstarts/tree/trunk/rds-aurora-mysql), the data is brought to the application, saving round trip time and data transfer time.
Consider a high-volume e-trading frontend application backed by an AWS RDS database containing a table of trades. To retrieve all trades over the last 24 hours, the application would need to query the remote database and transfer the data over the network. By accelerating the trades table locally using the [AWS RDS Data Connector](https://github.com/spiceai/cookbook/tree/trunk/mysql/rds-aurora#readme), the data is brought to the application, saving round trip time and data transfer time.

## Considerations

Expand Down
6 changes: 3 additions & 3 deletions spiceaidocs/docs/features/federated-queries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ To start using federated queries in Spice, follow these steps:

**Step 1.** Install Spice by following the [installation instructions](/getting-started/index.md).

**Step 2.** Clone the Spice Quickstarts repository and navigate to the `federation` directory.
**Step 2.** Clone the Spice Cookbook repository and navigate to the `federation` directory.

```bash
git clone https://github.com/spiceai/quickstarts.git
cd quickstarts/federation
git clone https://github.com/spiceai/cookbook.git
cd cookbook/federation
```

**Step 3.** Start PostgreSQL with Docker Compose & login to the demo Dremio.
Expand Down
3 changes: 1 addition & 2 deletions spiceaidocs/docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,4 @@ Time: 0.045150667 seconds. 10 rows.

import DocCardList from '@theme/DocCardList';

<DocCardList items={[{type: 'link', label: 'Quickstarts', href: 'https://github.com/spiceai/quickstarts', description: 'Spice.ai Quickstart Tutorials.'},
{type: 'link', label: 'Samples', href: 'https://github.com/spiceai/samples', description: 'Dive deeper with in-depth samples.'},]} />
<DocCardList items={[{type: 'link', label: 'Cookbook', href: 'https://github.com/spiceai/cookbook', description: 'Spice.ai Cookbook Recipes.'}]} />
4 changes: 2 additions & 2 deletions spiceaidocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Spice makes it fast and easy to query data from one or more sources using SQL. Y

### Example Use-Cases

**1. Faster applications and frontends.** Accelerate and co-locate datasets with applications and frontends, to serve more concurrent queries and users with faster page loads and data updates. [Try the CQRS sample app](https://github.com/spiceai/samples/tree/trunk/acceleration#local-materialization-and-acceleration-cqrs-sample)
**1. Faster applications and frontends.** Accelerate and co-locate datasets with applications and frontends, to serve more concurrent queries and users with faster page loads and data updates. [Try the CQRS Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/cqrs#readme)

**2. Faster dashboards, analytics, and BI.** Faster, more responsive dashboards without massive compute costs. [Watch the Apache Superset demo](https://github.com/spiceai/samples/blob/trunk/sales-bi/README.md)
**2. Faster dashboards, analytics, and BI.** Faster, more responsive dashboards without massive compute costs. [Watch the Apache Superset demo](https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md)

**3. Faster data pipelines, machine learning training and inferencing.** Co-locate datasets in pipelines where the data is needed to minimize data-movement and improve query performance. [Predict hard drive failure with the SMART data demo](https://github.com/spiceai/demos/tree/trunk/smart-demo#spiceai-smart-demo)

Expand Down
4 changes: 2 additions & 2 deletions spiceaidocs/docs/use-cases/database-cdn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pagination_next: null

Colocate a local working set of hot data with data applications and frontends to serve more concurrent requests and users with faster page loads and data updates.

[Try the CQRS sample app](https://github.com/spiceai/samples/tree/trunk/acceleration#local-materialization-and-acceleration-cqrs-sample)
[Try the CQRS Cookbook Recipe](https://github.com/spiceai/cookbook/tree/trunk/cqrs#readme)

## Increasing application resilience

Expand All @@ -21,4 +21,4 @@ Maintain local replicas of data with the application to significantly enhance ap

Create a materialization layer for visualization tools like Power BI, Tableau, or Superset to achieve faster, more responsive dashboards without incurring massive compute costs.

[Watch the Apache Superset demo](https://github.com/spiceai/samples/blob/trunk/sales-bi/README.md)
[Watch the Apache Superset demo](https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md)
3 changes: 1 addition & 2 deletions spiceaidocs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
docsSidebar: [
{type: 'autogenerated', dirName: '.'},
{type: 'link', label: 'Quickstarts', href: 'https://github.com/spiceai/quickstarts'},
{type: 'link', label: 'Samples', href: 'https://github.com/spiceai/samples'},
{type: 'link', label: 'Cookbook', href: 'https://github.com/spiceai/cookbook'},
],

// But you can create a sidebar manually
Expand Down
38 changes: 5 additions & 33 deletions spicepod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,12 @@ datasets:
overlap_size: 128
trim_whitespace: true

- from: github:github.com/spiceai/samples/files/trunk
name: spiceai.samples
description: Spice.ai OSS samples
- from: github:github.com/spiceai/cookbook/files/trunk
name: spiceai.cookbook
description: Spice.ai OSS cookbook recipes
metadata:
instructions: Documents are stored in Markdown. Always provide citations.
reference_base_url: https://github.com/spiceai/samples/tree/trunk/<sample_path>
params:
github_client_id: ${secrets:GITHUB_CLIENT_ID}
github_private_key: ${secrets:GITHUB_PRIVATE_KEY}
github_installation_id: ${secrets:GITHUB_INSTALLATION_ID}
include: "**/*.md"
acceleration:
enabled: true
refresh_check_interval: 4h
refresh_jitter_enabled: true
refresh_jitter_max: 30m
columns:
- name: content
embeddings:
- from: openai_embeddings
row_id:
- path
chunking:
enabled: true
target_chunk_size: 512
overlap_size: 128
trim_whitespace: true

- from: github:github.com/spiceai/quickstarts/files/trunk
name: spiceai.quickstarts
description: Spice.ai OSS quickstarts
metadata:
instructions: Documents are stored in Markdown. Always provide citations.
reference_base_url: https://github.com/spiceai/quickstarts/tree/trunk/<quickstart_path>
reference_base_url: https://github.com/spiceai/cookbook/tree/trunk/<recipe_path>
params:
file_format: md
github_client_id: ${secrets:GITHUB_CLIENT_ID}
Expand Down Expand Up @@ -157,7 +129,7 @@ models:
Prefer "docs" dataset for documentation and reference information questions.
Prefer "samples" and "quickstarts" datasets for use cases, sample code, and configuration questions. Always include links to relevant samples or quickstarts.
Prefer "cookbook" recipe datasets for use cases, sample code, and configuration questions. Always include links to relevant recipes.
Use the SQL tool (sql_query) when:
1. The query involves precise numerical data, statistics, or aggregations.
Expand Down

0 comments on commit 0a7ac95

Please sign in to comment.