Skip to content
Merged
Changes from 1 commit
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
44 changes: 23 additions & 21 deletions src/content/docs/r2/data-catalog/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Iceberg clients (including [PyIceberg](https://py.iceberg.apache.org/)) must aut

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/).

## 5. Install marimo
## 5. Install marimo and set up your project with uv

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

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

2. Change into our new directory:
2. Change into our new directory:

```
cd r2-data-catalog-notebook
```
```
cd r2-data-catalog-notebook
```

3. Create a new Python virtual environment:

```
uv venv
```
3. Initialize a new uv project (this creates a `.venv` and a `pyproject.toml`):

4. Activate the Python virtual environment:
```
uv init
```

```
source .venv/bin/activate
```
5. Add marimo and required dependencies:

5. Install marimo with uv:

```py
uv pip install marimo
```
```py
uv add marimo pyiceberg pyarrow pandas
```

</Steps>

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

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

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

3. Replace the `CATALOG_URI`, `WAREHOUSE`, and `TOKEN` variables with your values from sections **2** and **3** respectively.
3. Replace the `CATALOG_URI`, `WAREHOUSE`, and `TOKEN` variables with your values from sections **2** and **3** respectively.

4. Launch the notebook editor in your browser:

```
uv run marimo edit r2-data-catalog-tutorial.py
```

Once your notebook connects to the catalog, you'll see the catalog along with its namespaces and tables appear in marimo's Datasources panel.

</Steps>
In the Python notebook above, you:
Expand Down