Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions _data/shared_chrome.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _docs/latest/cloud/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Metabase Cloud does not support customization of the "from address" for emailed

You won't be able to access the application database; if you want insights into how people are using your Metabase, check out [Usage analytics](../usage-and-performance-tools/usage-analytics).

## Queries time out after ten minutes
## Queries time out after 20 minutes

If a query takes longer than ten minutes to run, it will time out.
If a query takes longer than 20 minutes to run, it will time out.
2 changes: 1 addition & 1 deletion _docs/v0.62/ai/system-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ System prompts let you customize instructions for Metabot. You can write a separ
- **Natural language queries**: query-builder questions generated from natural language.
- **SQL generation**: SQL written from prompts (sidebar or [inline](./metabot#inline-sql-editing)).

Like text cards on dashboards, prompts support [Markdown](/learn/metabase-basics/querying-and-dashboards/dashboards/markdown).
Like text cards on dashboards, prompts support [Markdown](../dashboards/markdown).

## Prompt tips

Expand Down
64 changes: 15 additions & 49 deletions _docs/v0.62/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4829,7 +4829,13 @@
}
},
"required" : [ "channel_type", "details" ]
}, { } ]
}, {
"type" : "object",
"properties" : {
"channel_type" : { }
},
"required" : [ "channel_type" ]
} ]
},
"metabase.channel.models.channel.ChannelTemplateEmailDetails" : {
"oneOf" : [ {
Expand Down Expand Up @@ -4898,7 +4904,13 @@
}
},
"required" : [ "channel_type", "details" ]
}, { } ]
}, {
"type" : "object",
"properties" : {
"channel_type" : { }
},
"required" : [ "channel_type" ]
} ]
},
"metabase.collections-rest.api.DashboardQuestionCandidate" : {
"type" : "object",
Expand Down Expand Up @@ -42727,7 +42739,7 @@
"get" : {
"operationId" : "get-api-search",
"summary" : "GET /api/search",
"description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n `context` identifies the surface issuing the search; it selects the ranking weights and filter defaults.\n It defaults to `api`, the value for programmatic callers.\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filter_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `vector_search_strategy`: for the semantic engine, `hnsw` (approximate index search, default) or `brute-force` (exact filter-first search); ignored by other engines\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.",
"description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n `context` identifies the surface issuing the search; it selects the ranking weights and filter defaults.\n It defaults to `api`, the value for programmatic callers.\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filter_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `vector_search_strategy`: for the semantic engine, `hnsw` (approximate index search, default) or `brute-force` (exact filter-first search); ignored by other engines\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.",
"parameters" : [ {
"in" : "query",
"name" : "q",
Expand Down Expand Up @@ -42992,29 +43004,6 @@
"type" : "null"
} ]
}
}, {
"in" : "query",
"name" : "non_temporal_dim_ids",
"required" : false,
"schema" : {
"oneOf" : [ {
"type" : "string",
"minLength" : 1
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
"name" : "has_temporal_dim",
"required" : false,
"schema" : {
"oneOf" : [ {
"type" : "boolean"
}, {
"type" : "null"
} ]
}
} ],
"responses" : {
"2XX" : {
Expand Down Expand Up @@ -43299,29 +43288,6 @@
"type" : "null"
} ]
}
}, {
"in" : "query",
"name" : "non_temporal_dim_ids",
"required" : false,
"schema" : {
"oneOf" : [ {
"type" : "string",
"minLength" : 1
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
"name" : "has_temporal_dim",
"required" : false,
"schema" : {
"oneOf" : [ {
"type" : "boolean"
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
"name" : "expected_result_type",
Expand Down
2 changes: 1 addition & 1 deletion _docs/v0.62/dashboards/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You can use [Markdown](https://commonmark.org/help/) to format the text in your

![Result](images/result.png)

To learn more, see [Fun with Markdown in your dashboards](/learn/metabase-basics/querying-and-dashboards/dashboards/markdown).
To learn more, see [Format text with Markdown](./markdown).

### Including variables in text cards

Expand Down
4 changes: 3 additions & 1 deletion _docs/v0.62/data-studio/transforms/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ With basic transforms, you can:

- **Metabase Cloud**: Basic transform functionality on Metabase Cloud - Starter, Pro, or Enterprise - comes with an additional small fee per successful transform run, see [Pricing](/pricing).

Only people logged in with an email of a [Metabase Store admin](../../cloud/accounts-and-billing#add-managers) (not just Metabase _instance_ admins) can [enable basic transforms](./transforms-overview#enable-transforms).
Only people logged in with an email of a [Metabase Store admin](../../cloud/accounts-and-billing#add-managers) (not just Metabase _instance_ admins) can [enable basic transforms](./transforms-overview#enable-transforms).

### Cancel basic transforms

Expand Down Expand Up @@ -72,6 +72,8 @@ The Advanced transforms add-on comes with an additional charge per successful tr

To enable Advanced transforms functionality, you need to have [Basic transforms](#basic-transforms) already, see [Enable basic transforms](#enable-basic-transforms).

For the full self-hosted setup see [Set up transforms on a self-hosted Metabase](transforms-overview#set-up-transforms-on-a-self-hosted-metabase).

There are two ways to enable Advanced transforms:

- **From your Metabase instance**: you can navigate to a feature requiring advanced transforms (like Python transforms or transform inspector), and follow the prompts to upgrade.
Expand Down
146 changes: 66 additions & 80 deletions _docs/v0.62/data-studio/transforms/python-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To run Python transforms from a self-hosted Metabase, you'll need to configure a

## Prerequisites

- Docker installed and running.
- Docker installed and running, or an infrastructure that can run containers.
- **Self-hosted Metabase Pro or Enterprise license** (Python Runner requires a Pro/Enterprise plan).
- For production: an S3-compatible storage bucket (AWS S3, MinIO, etc.).

Expand Down Expand Up @@ -76,13 +76,13 @@ docker network create metabase-network
docker run -d \
--network metabase-network \
-e AUTH_TOKEN=your-secure-token-here \
--name python-runner metabase/python-runner:latest
--name python-runner --hostname python-runner metabase/python-runner:latest

docker run -d \
--network metabase-network \
-p 3000:3000 \
-e MB_PYTHON_RUNNER_URL=http://python-runner:5000 \
-e MB_PYTHON_RUNNER_API_TOKEN=your-secure-token-here \
-e MB_PYTHON_RUNNER_API_TOKEN=<your-secure-token-here> \
-e MB_PYTHON_STORAGE_S_3_ENDPOINT=https://s3.amazonaws.com \
-e MB_PYTHON_STORAGE_S_3_BUCKET=your-bucket-name \
-e MB_PYTHON_STORAGE_S_3_REGION=us-east-1 \
Expand All @@ -104,24 +104,27 @@ docker run -d \

These settings can also be configured in the Metabase UI at **Admin** > **Settings** > **Python Runner**. Note that environment variables take precedence over UI settings.

| Variable | Description |
| ----------------------------------------- | ---------------------------------------------------------------------------------- |
| `MB_PYTHON_RUNNER_URL` | URL where Metabase can reach the Python Runner (e.g., `http://python-runner:5000`) |
| `MB_PYTHON_RUNNER_API_TOKEN` | Authentication token. Must match `AUTH_TOKEN` in the Python Runner. |
| `MB_PYTHON_STORAGE_S_3_ENDPOINT` | S3 endpoint URL. |
| `MB_PYTHON_STORAGE_S_3_BUCKET` | S3 bucket name for storing Python artifacts |
| `MB_PYTHON_STORAGE_S_3_REGION` | AWS region (e.g., `us-east-1`) |
| `MB_PYTHON_STORAGE_S_3_ACCESS_KEY` | S3 access key |
| `MB_PYTHON_STORAGE_S_3_SECRET_KEY` | S3 secret key |
| `MB_PYTHON_STORAGE_S_3_PATH_STYLE_ACCESS` | (Optional) Set to `true` for S3-compatible services like MinIO or LocalStack |
| Variable | Description |
| ------------------------------------------ | ---------------------------------------------------------------------------------- |
| `MB_PYTHON_RUNNER_URL` | URL where Metabase can reach the Python Runner (e.g., `http://python-runner:5000`) |
| `MB_PYTHON_RUNNER_API_TOKEN` | Authentication token. Must match `AUTH_TOKEN` in the Python Runner. |
| `MB_PYTHON_STORAGE_S_3_ENDPOINT` | S3 endpoint URL. |
| `MB_PYTHON_STORAGE_S_3_CONTAINER_ENDPOINT` | S3 endpoint seen from the runner container, if different from the main endpoint. |
| `MB_PYTHON_STORAGE_S_3_BUCKET` | S3 bucket name for storing Python artifacts |
| `MB_PYTHON_STORAGE_S_3_REGION` | AWS region (e.g., `us-east-1`) |
| `MB_PYTHON_STORAGE_S_3_ACCESS_KEY` | S3 access key |
| `MB_PYTHON_STORAGE_S_3_SECRET_KEY` | S3 secret key |
| `MB_PYTHON_STORAGE_S_3_PATH_STYLE_ACCESS` | (Optional) Set to `true` for S3-compatible services like MinIO or LocalStack |

`MB_PYTHON_STORAGE_S_3_CONTAINER_ENDPOINT` is the host Metabase signs into the presigned URLs the runner uploads to and downloads from. Set it when the runner resolves storage by a different hostname than Metabase does.

## Using Docker Compose

Docker Compose simplifies managing multiple containers. Below are example configurations for different scenarios.
Below are example configurations for different scenarios.

### Simple setup with LocalStack
### Self-hosted storage with MinIO

For simple setup and local testing, you can use LocalStack to simulate S3:
[MinIO](https://min.io/) is an S3-compatible server you can run yourself, which makes it a common pick for self-hosted Metabase. This Compose file runs Metabase, the Python runner, MinIO, and a short-lived container that creates the bucket Metabase will use — neither MinIO nor Metabase creates that bucket for you.

```yml
name: metabase-python-runner
Expand All @@ -132,93 +135,76 @@ services:
- "3000:3000"
environment:
- MB_PYTHON_RUNNER_URL=http://python-runner:5000
- MB_PYTHON_RUNNER_API_TOKEN=your-secure-token-here
- MB_PYTHON_STORAGE_S_3_ENDPOINT=http://localstack:4566
- MB_PYTHON_RUNNER_API_TOKEN=${AUTH_TOKEN}
- MB_PYTHON_STORAGE_S_3_ENDPOINT=http://minio:9000
- MB_PYTHON_STORAGE_S_3_CONTAINER_ENDPOINT=http://minio:9000
- MB_PYTHON_STORAGE_S_3_BUCKET=metabase-python-runner
- MB_PYTHON_STORAGE_S_3_REGION=us-east-1
- MB_PYTHON_STORAGE_S_3_PATH_STYLE_ACCESS=true
- MB_PYTHON_STORAGE_S_3_ACCESS_KEY=test
- MB_PYTHON_STORAGE_S_3_SECRET_KEY=test
- MB_PYTHON_STORAGE_S_3_ACCESS_KEY=${MINIO_ROOT_USER}
- MB_PYTHON_STORAGE_S_3_SECRET_KEY=${MINIO_ROOT_PASSWORD}
depends_on:
localstack-init:
minio-init:
condition: service_completed_successfully
python-runner:
condition: service_started

python-runner:
image: metabase/python-runner:latest
environment:
- AUTH_TOKEN=your-secure-token-here
- AUTH_TOKEN=${AUTH_TOKEN}

localstack:
image: localstack/localstack:latest
minio:
image: quay.io/minio/minio:latest
command: server /data --console-address ":9001"
environment:
- SERVICES=s3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 5s
timeout: 5s
retries: 10

localstack-init:
image: localstack/localstack:latest
entrypoint:
["/bin/sh", "-c", "awslocal s3 mb s3://metabase-python-runner || true"]
environment:
- AWS_ENDPOINT_URL=http://localstack:4566
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
volumes:
- minio-data:/data

minio-init:
image: quay.io/minio/mc:latest
depends_on:
localstack:
condition: service_healthy
minio:
condition: service_started
entrypoint:
- /bin/sh
- -c
- |
until mc alias set local http://minio:9000 "${MINIO_ROOT_USER}" "${MINIO_ROOT_PASSWORD}" >/dev/null 2>&1; do
echo "waiting for minio..."; sleep 2;
done
mc mb --ignore-existing local/metabase-python-runner

volumes:
minio-data: {}
```

Then run:
Both S3 endpoint variables point at `http://minio:9000` because Metabase and the runner share the Compose network and reach MinIO by the same hostname. `MB_PYTHON_STORAGE_S_3_CONTAINER_ENDPOINT` sets the host Metabase signs into the presigned URLs the runner uploads to and downloads from — if your runner resolves storage by a different hostname than Metabase does, set this to the runner's view of it.

Create a `.env` file:

```bash
docker compose up -d
AUTH_TOKEN=your-secure-token-here
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
```

### Production setup
Then bring everything up and try a transform:

For production, use an external S3-compatible storage service:
1. Put a strong shared secret in `AUTH_TOKEN` (the runner and Metabase have to agree on it):

```yml
name: metabase-python-runner
services:
metabase:
image: metabase/metabase-enterprise:latest
ports:
- "3000:3000"
environment:
- MB_PYTHON_RUNNER_URL=http://python-runner:5000
- MB_PYTHON_RUNNER_API_TOKEN=${AUTH_TOKEN}
- MB_PYTHON_STORAGE_S_3_ENDPOINT=${S3_ENDPOINT}
- MB_PYTHON_STORAGE_S_3_BUCKET=${S3_BUCKET}
- MB_PYTHON_STORAGE_S_3_REGION=${S3_REGION:-us-east-1}
- MB_PYTHON_STORAGE_S_3_ACCESS_KEY=${S3_ACCESS_KEY}
- MB_PYTHON_STORAGE_S_3_SECRET_KEY=${S3_SECRET_KEY}
depends_on:
python-runner:
condition: service_started

python-runner:
image: metabase/python-runner:latest
environment:
- AUTH_TOKEN=${AUTH_TOKEN}
```
```bash
openssl rand -hex 32
```

Create a `.env` file with your configuration:
2. Start the stack:

```bash
AUTH_TOKEN=your-secure-token-here
S3_ENDPOINT=https://s3.amazonaws.com
S3_BUCKET=metabase-python-runner
S3_REGION=us-east-1
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
```
```bash
docker compose up -d
```

Then run:
3. You'll need a Pro or Enterprise license with the [Advanced transforms add-on](addons). In Metabase, [enable transforms](transforms-overview#enable-transforms), then [create a Python transform](python-transforms#create-a-python-transform) and click **Run**.

```bash
docker compose up -d
```
4. Open **Data Studio > Jobs > Runs** and find your run. If it failed, the run's logs will usually tell you whether Metabase couldn't reach the runner, or the runner couldn't reach MinIO.
Loading