Intermediate developers looking to design audit records and sign-adjusted financial aggregations.
Audit accounts by summing deposits and withdrawals.
Save the following raw rows locally as \`dataset.csv\` to test your pipeline:
account_id,type,amount
acct1,deposit,1500.00
acct2,withdrawal,200.00
acct1,withdrawal,100.00
acct3,deposit,3000.00
acct2,deposit,500.00Create a local file named \`starter.py\` and copy the following skeleton. Complete the missing transformations:
# starter.py - Banking Transactions
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
def run_pipeline():
options = PipelineOptions()
with beam.Pipeline(options=options) as p:
# TODO: Map transaction type to positive/negative values
# TODO: Calculate net change per account
pass
if __name__ == "__main__":
run_pipeline()