# 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,
  },
)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/baseline/create_run_query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
