πŸ“Œ
MBPY: Schools Technology
  • About this Resource
  • Installation
    • Requirements
    • Getting Started Local Install
    • Getting Started using Docker
    • Further instructions with Docker
    • Updating with Docker
  • Tutorials
    • Configuration
    • Importing
    • Extracting
    • Streaming
    • Pipelines
    • Scripting
    • Big Query
  • Querying & Tranformations
    • Querying Commands
    • Querying the Database
    • Querying via Script
    • Querying via an SQLite Client
  • Scripts
    • Daily Homeroom Attendance Report
  • Pipelines
    • Dataframes with pandas
    • Pipelines
    • Example Pipelines
      • Bulk Change Email domain
      • Enrollment by Gender
  • Plugins
    • mbpy_powerschool_plugin
      • PowerSchool Plugin
        • API reference
      • mbpy Plugin
        • mbpy plugin source code
    • Plugins Overview
    • mbpy_plugin_example
    • mbpy_plugin_destiny
    • mbpy_plugin_attendance_reports
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Tutorials

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
╢─────────────────────────────┼───────────────────┼────────────┼─────────╴
...
PreviousStreamingNextScripting

Last updated 1 year ago

Was this helpful?