Skip to content

Commit 97c3c83

Browse files
Re-order the getting started to link to quickstarts/samples in Next Steps, moves the Spice.ai Cloud section to its own sub-page (#173)
* Adds links to the Samples/Quickstarts from the docs sidebar * reorder * Re-order the getting started
1 parent 12ec726 commit 97c3c83

File tree

3 files changed

+122
-105
lines changed

3 files changed

+122
-105
lines changed

spiceaidocs/docs/getting-started/index.md

Lines changed: 4 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -141,108 +141,8 @@ Query took: 0.002458976 seconds
141141

142142
## Next Steps
143143

144-
You can use any number of predefined datasets available from Spice.ai in the Spice runtime.
144+
import DocCardList from '@theme/DocCardList';
145145

146-
A list of publically available datasets from Spice.ai can be found here: https://[docs.spice.ai/building-blocks/datasets](https://docs.spice.ai/building-blocks/datasets).
147-
148-
In order to access public datasets from Spice, you will first need to create an account with Spice.ai by selecting the free tier membership.
149-
150-
Navigate to [spice.ai](https://spice.ai/) and create a new account by clicking on Try for Free.
151-
152-
<img width="500" alt="spiceai_try_for_free-1" src="https://github.com/spiceai/spiceai/assets/112157037/27fb47ed-4825-4fa8-94bd-48197406cfaa" />
153-
154-
After creating an account, you will need to create an app in order to create to an API key.
155-
156-
![create_app-1](https://github.com/spiceai/spiceai/assets/112157037/d2446406-1f06-40fb-8373-1b6d692cb5f7)
157-
158-
You will now be able to access datasets from the Spice.ai Platform. For this quickstart, we will be using the `eth.recent_blocks` dataset.
159-
160-
**Step 1.** Log in and authenticate from the command line using the `spice login` command. A pop up browser window will prompt you to authenticate:
161-
162-
```bash
163-
spice login
164-
```
165-
166-
**Step 2.** Initialize a new project and start the runtime:
167-
168-
```bash
169-
# Initialize a new Spice app
170-
spice init spice_app
171-
172-
# Change to app directory
173-
cd spice_app
174-
175-
# Start the runtime
176-
spice run
177-
```
178-
179-
**Step 3.** Configure the dataset:
180-
181-
In a new terminal window, configure a new dataset using the `spice dataset configure` command:
182-
183-
```bash
184-
spice dataset configure
185-
```
186-
187-
Enter a dataset name that will be used to reference the dataset in queries. This name does not need to match the name in the dataset source.
188-
189-
```bash
190-
dataset name: (spice_app) eth_recent_blocks
191-
```
192-
193-
Enter the description of the dataset:
194-
195-
```
196-
description: Recent Ethereum blocks
197-
```
198-
199-
Enter the location of the dataset:
200-
201-
```bash
202-
from: spice.ai/eth.recent_blocks
203-
```
204-
205-
Select `y` when prompted whether to accelerate the data:
206-
207-
```bash
208-
Locally accelerate (y/n)? y
209-
```
210-
211-
You should see the following output from your runtime terminal:
212-
213-
```bash
214-
2024-02-21T22:49:10.038461Z INFO runtime: Loaded dataset: eth_recent_blocks
215-
```
216-
217-
**Step 4.** In a new terminal window, use the Spice SQL REPL to query the dataset
218-
219-
```bash
220-
spice sql
221-
```
222-
223-
```bash
224-
SELECT number, size, gas_used from eth_recent_blocks LIMIT 10;
225-
```
226-
227-
The output displays the results of the query along with the query execution time:
228-
229-
```bash
230-
+----------+--------+----------+
231-
| number | size | gas_used |
232-
+----------+--------+----------+
233-
| 19281345 | 400378 | 16150051 |
234-
| 19281344 | 200501 | 16480224 |
235-
| 19281343 | 97758 | 12605531 |
236-
| 19281342 | 89629 | 12035385 |
237-
| 19281341 | 133649 | 13335719 |
238-
| 19281340 | 307584 | 18389159 |
239-
| 19281339 | 89233 | 13391332 |
240-
| 19281338 | 75250 | 12806684 |
241-
| 19281337 | 100721 | 11823522 |
242-
| 19281336 | 150137 | 13418403 |
243-
+----------+--------+----------+
244-
245-
Query took: 0.004057791 seconds
246-
```
247-
248-
You can experiment with the time it takes to generate queries when using non-accelerated datasets. You can change the acceleration setting from `true` to `false` in the datasets.yaml file.
146+
<DocCardList items={[{type: 'link', label: 'Quickstarts', href: 'https://github.com/spiceai/quickstarts', description: 'Spice.ai Quickstart Tutorials.'},
147+
{type: 'link', label: 'Samples', href: 'https://github.com/spiceai/samples', description: 'Dive deeper with in-depth samples.'},]} />
148+
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: 'Spice.ai OSS and the Spice.ai Cloud Platform'
3+
sidebar_label: 'Spice.ai Cloud Platform'
4+
sidebar_position: 1
5+
description: 'Connect to the Spice.ai Cloud Platform to access public datasets.'
6+
pagination_next: null
7+
---
8+
9+
You can use any number of predefined datasets available from the Spice.ai Cloud Platform in the Spice runtime.
10+
11+
A list of publically available datasets from Spice.ai can be found here: [https://docs.spice.ai/building-blocks/datasets](https://docs.spice.ai/building-blocks/datasets).
12+
13+
In order to access public datasets from Spice, you will first need to create an account with Spice.ai by selecting the free tier membership.
14+
15+
Navigate to [spice.ai](https://spice.ai/) and create a new account by clicking on Try for Free.
16+
17+
<img width="500" alt="spiceai_try_for_free-1" src="https://github.com/spiceai/spiceai/assets/112157037/27fb47ed-4825-4fa8-94bd-48197406cfaa" />
18+
19+
After creating an account, you will need to create an app in order to create to an API key.
20+
21+
![create_app-1](https://github.com/spiceai/spiceai/assets/112157037/d2446406-1f06-40fb-8373-1b6d692cb5f7)
22+
23+
You will now be able to access datasets from the Spice.ai Platform. For this quickstart, we will be using the `eth.recent_blocks` dataset.
24+
25+
**Step 1.** Log in and authenticate from the command line using the `spice login` command. A pop up browser window will prompt you to authenticate:
26+
27+
```bash
28+
spice login
29+
```
30+
31+
**Step 2.** Initialize a new project and start the runtime:
32+
33+
```bash
34+
# Initialize a new Spice app
35+
spice init spice_app
36+
37+
# Change to app directory
38+
cd spice_app
39+
40+
# Start the runtime
41+
spice run
42+
```
43+
44+
**Step 3.** Configure the dataset:
45+
46+
In a new terminal window, configure a new dataset using the `spice dataset configure` command:
47+
48+
```bash
49+
spice dataset configure
50+
```
51+
52+
Enter a dataset name that will be used to reference the dataset in queries. This name does not need to match the name in the dataset source.
53+
54+
```bash
55+
dataset name: (spice_app) eth_recent_blocks
56+
```
57+
58+
Enter the description of the dataset:
59+
60+
```
61+
description: Recent Ethereum blocks
62+
```
63+
64+
Enter the location of the dataset:
65+
66+
```bash
67+
from: spice.ai/eth.recent_blocks
68+
```
69+
70+
Select `y` when prompted whether to accelerate the data:
71+
72+
```bash
73+
Locally accelerate (y/n)? y
74+
```
75+
76+
You should see the following output from your runtime terminal:
77+
78+
```bash
79+
2024-02-21T22:49:10.038461Z INFO runtime: Loaded dataset: eth_recent_blocks
80+
```
81+
82+
**Step 4.** In a new terminal window, use the Spice SQL REPL to query the dataset
83+
84+
```bash
85+
spice sql
86+
```
87+
88+
```bash
89+
SELECT number, size, gas_used from eth_recent_blocks LIMIT 10;
90+
```
91+
92+
The output displays the results of the query along with the query execution time:
93+
94+
```bash
95+
+----------+--------+----------+
96+
| number | size | gas_used |
97+
+----------+--------+----------+
98+
| 19281345 | 400378 | 16150051 |
99+
| 19281344 | 200501 | 16480224 |
100+
| 19281343 | 97758 | 12605531 |
101+
| 19281342 | 89629 | 12035385 |
102+
| 19281341 | 133649 | 13335719 |
103+
| 19281340 | 307584 | 18389159 |
104+
| 19281339 | 89233 | 13391332 |
105+
| 19281338 | 75250 | 12806684 |
106+
| 19281337 | 100721 | 11823522 |
107+
| 19281336 | 150137 | 13418403 |
108+
+----------+--------+----------+
109+
110+
Query took: 0.004057791 seconds
111+
```
112+
113+
You can experiment with the time it takes to generate queries when using non-accelerated datasets. You can change the acceleration setting from `true` to `false` in the datasets.yaml file.

spiceaidocs/sidebars.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
1212
*/
1313
const sidebars: SidebarsConfig = {
1414
// By default, Docusaurus generates a sidebar from the docs folder structure
15-
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
15+
docsSidebar: [
16+
{type: 'autogenerated', dirName: '.'},
17+
{type: 'link', label: 'Quickstarts', href: 'https://github.com/spiceai/quickstarts'},
18+
{type: 'link', label: 'Samples', href: 'https://github.com/spiceai/samples'},
19+
],
1620

1721
// But you can create a sidebar manually
1822
/*

0 commit comments

Comments
 (0)