def _unify_data()

in pipelines/cdp/cdp_pipeline/customer_data_platform.py [0:0]


def _unify_data(pcolls: tuple[PCollection, PCollection]) -> PCollection[str]:
  transactions_pcoll, coupons_redempt_pcoll = pcolls
  unified_data = ((transactions_pcoll, coupons_redempt_pcoll)
                  | "Combine Transactions and Coupons" >> beam.CoGroupByKey()
                  | beam.FlatMap(left_join))
  return unified_data