시작하기무료로 시작하기

데이터 파이프라인 아키텍처 패턴

데이터 파이프라인을 만들 때는, 함수가 정의되는 파일과 함수가 실행되는 위치를 분리하는 것이 좋습니다.

이번 연습에서는 파이프라인 구성 요소를 메모리로 가져온 뒤, 이 함수들을 사용해 파이프라인을 end-to-end로 실행해 보겠습니다. 프로젝트 구조는 아래와 같으며, pipeline_utils에는 파이프라인 실행에 사용할 extract(), transform(), load() 함수가 들어 있습니다.

> ls
 etl_pipeline.py
 pipeline_utils.py

이 연습은 강의의 일부입니다

Python으로 ETL과 ELT

강의 보기

연습 안내

  • pipeline_utils 모듈에서 extract, transform, load 함수를 가져오세요.
  • 가져온 함수를 사용해 데이터 파이프라인을 end-to-end로 실행하세요.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Import the extract, transform, and load functions from pipeline_utils
____

# Run the pipeline end to end by extracting, transforming and loading the data
raw_tax_data = ____("raw_tax_data.csv")
clean_tax_data = ____(raw_tax_data)
____(clean_tax_data, "clean_tax_data.parquet")
코드 편집 및 실행