# create\_run\_query

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

## Parameters

| Arguments | Description                                                                                                                                                                                                                                         |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project` | The dbnl [project](https://docs.dbnl.com/v0.19.x/using-distributional/python-sdk/sdk-objects/project "mention")this [runquery](https://docs.dbnl.com/v0.19.x/using-distributional/python-sdk/sdk-objects/runquery "mention")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](https://docs.dbnl.com/v0.19.x/using-distributional/python-sdk/sdk-objects/runquery "mention") | A new dbnl RunQuery, typically used for finding a [dynamic-baseline](https://docs.dbnl.com/v0.19.x/using-distributional/testing/production-testing/dynamic-baseline "mention")for a Test Session |

## Example

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