> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/tutorials/pipelines.md). Agents can also search and read this documentation through its [MCP server](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/~gitbook/mcp).

# Pipelines

Using

Pipelines are like saved queries. They produce a data set that would otherwise be a very long command.

### View

Pipelines come with some built-in, and can be installed via plugins. To see what is currently available:

```
mbpy pipelines --help
```

For example:

```
mbpy pipelines enrollment-breakdown
```

Which outputs the following:

```
                                       count
class_grade_number class_grade gender
2                  PS 1        Female     8
                               Male       2
4                  PS 3        Female     7
                               Male       3
                   PYP 3       Female     5
                               Male       3
5                  PS 4        Female     7
                               Male      13
6                  PS 5        Female     6
                               Male      14
7                  MS 6        Female     4
```

Pipelines can also be used with the EXTRACT keyword, which will let allow you to pass it to a loader. Let's load it with our pretty printer PPRINT:

```
mbpy \
    EXTRACT \
        from-pipeline \
            --name enrollment-breakdown \
    PPRINT
```

```
  class_grade_number          │ class_grade       │ gender     │ count
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  2                           │ PS 1              │ Female     │ 8
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  2                           │ PS 1              │ Male       │ 2
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  4                           │ PS 3              │ Female     │ 7
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  4                           │ PS 3              │ Male       │ 3
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  4                           │ PYP 3             │ Female     │ 5
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  4                           │ PYP 3             │ Male       │ 3
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  5                           │ PS 4              │ Female     │ 7
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  5                           │ PS 4              │ Male       │ 13
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
  6                           │ PS 5              │ Female     │ 6
╶─────────────────────────────┼───────────────────┼────────────┼─────────╴
...
```
