> For the complete documentation index, see [llms.txt](https://docs.dbnl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/baseline/create_run_query.md).

# create\_run\_query

```python
dbnl.create_run_query(
    *,
    project: Project,
    name: str,
    query: dict[str, Any]
) -> RunQuery:
```

## Parameters

| Arguments | Description                                                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project` | The dbnl [Project](/v0.21.x/using-distributional/python-sdk/sdk-objects/project.md)this [RunQuery](/v0.21.x/using-distributional/python-sdk/sdk-objects/runquery.md)will be associated with |
| `name`    | Descriptive name for this Run Query. Must be unique at the Project level                                                                                                                    |
| `query`   | dict describing how to find a Run dynamically. Currently, only supports `"offset_from_now": int` as a key-value pair.                                                                       |

## Returns

| Type                                                                         | Description                                                                                                                                                          |
| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [RunQuery](/v0.21.x/using-distributional/python-sdk/sdk-objects/runquery.md) | A new dbnl RunQuery, typically used for finding a [Dynamic Baseline](/v0.21.x/using-distributional/testing/production-testing/dynamic-baseline.md)for a Test Session |

## Example

```python
dbnl.create_run_query(
  project=project,
  name="look back 3",
  query={
    "offset_from_now": 3,
  },
)
```
