pipeline
Main pipeline functions for the Devices RAP report. The pipeline is responsible for processing the raw data and creating the final reports.
amber_report_pipeline(fin_month, fin_year, mode='local', outputs='pickle', **config_kwargs)
Pipeline to create the monthly Amber Device Reports for all Regions.
The pipeline will:
- Configure the pipeline based on the provided financial month & year, mode, and output types.
- Load the datasets required for the report.
- Cleanse and normalise the datasets.
- Join the datasets to create a master dataset of devices.
- Create summary and detailed tables from the master dataset.
- Create regional cuts of the data.
- Interpret the output instructions to generate the final reports.
- Output the reports in the specified format (e.g., Excel, CSV).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fin_month
|
FinMonths
|
The financial month for which the report is being generated. |
required |
fin_year
|
FinYears
|
The financial year for which the report is being generated. |
required |
mode
|
PipelineMode
|
The mode in which the pipeline is run. Can be "local" or "remote". Defaults to "local". |
'local'
|
outputs
|
PipelineOutputs
|
The type of outputs to generate. Can be "excel", "csv", or "excel_zip". Defaults to "excel". |
'pickle'
|
**config_kwargs
|
dict
|
Additional keyword arguments to pass to the Config class for custom configuration. |
{}
|
Source code in devices_rap/pipeline.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
null_report_pipeline()
Pipeline to create the NULL report. This pipeline currently does nothing and serves as a placeholder.