Skip to content

Commit f76f1d7

Browse files
jonesphillipOxyjun
andauthored
Minor fixes in R2 Data Catalog getting started docs (#22693)
* Minor fixes in R2 Data Catalog getting started docs: adds missing dependencies, adds marimo edit command * Update src/content/docs/r2/data-catalog/get-started.mdx --------- Co-authored-by: Jun Lee <[email protected]>
1 parent e7fbdf3 commit f76f1d7

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/content/docs/r2/data-catalog/get-started.mdx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Iceberg clients (including [PyIceberg](https://py.iceberg.apache.org/)) must aut
112112

113113
You need to install a Python package manager. In this guide, use [uv](https://docs.astral.sh/uv/). If you do not already have uv installed, follow the [installing uv guide](https://docs.astral.sh/uv/getting-started/installation/).
114114

115-
## 5. Install marimo
115+
## 5. Install marimo and set up your project with uv
116116

117117
We will use [marimo](https://github.com/marimo-team/marimo) as a Python notebook.
118118

@@ -123,29 +123,23 @@ We will use [marimo](https://github.com/marimo-team/marimo) as a Python notebook
123123
mkdir r2-data-catalog-notebook
124124
```
125125

126-
2. Change into our new directory:
126+
2. Change into our new directory:
127127

128-
```
129-
cd r2-data-catalog-notebook
130-
```
128+
```
129+
cd r2-data-catalog-notebook
130+
```
131131

132-
3. Create a new Python virtual environment:
133-
134-
```
135-
uv venv
136-
```
132+
3. Initialize a new uv project (this creates a `.venv` and a `pyproject.toml`):
137133

138-
4. Activate the Python virtual environment:
134+
```
135+
uv init
136+
```
139137

140-
```
141-
source .venv/bin/activate
142-
```
138+
4. Add marimo and required dependencies:
143139

144-
5. Install marimo with uv:
145-
146-
```py
147-
uv pip install marimo
148-
```
140+
```py
141+
uv add marimo pyiceberg pyarrow pandas
142+
```
149143

150144
</Steps>
151145

@@ -154,7 +148,7 @@ We will use [marimo](https://github.com/marimo-team/marimo) as a Python notebook
154148
<Steps>
155149
1. Create a file called `r2-data-catalog-tutorial.py`.
156150

157-
2. Paste the following code snippet into your `r2-data-catalog-tutorial.py` file:
151+
2. Paste the following code snippet into your `r2-data-catalog-tutorial.py` file:
158152

159153
```py
160154
import marimo
@@ -269,7 +263,15 @@ We will use [marimo](https://github.com/marimo-team/marimo) as a Python notebook
269263
app.run()
270264
```
271265

272-
3. Replace the `CATALOG_URI`, `WAREHOUSE`, and `TOKEN` variables with your values from sections **2** and **3** respectively.
266+
3. Replace the `CATALOG_URI`, `WAREHOUSE`, and `TOKEN` variables with your values from sections **2** and **3** respectively.
267+
268+
4. Launch the notebook editor in your browser:
269+
270+
```
271+
uv run marimo edit r2-data-catalog-tutorial.py
272+
```
273+
274+
Once your notebook connects to the catalog, you'll see the catalog along with its namespaces and tables appear in marimo's Datasources panel.
273275

274276
</Steps>
275277
In the Python notebook above, you:

0 commit comments

Comments
 (0)