BaşlayınÜcretsiz Başlayın

The "T" in ELT

Let's not forget about ELT! Here, the extract() and load() functions have been defined for you. Now, all that's left is to finish defining the transform() function and run the pipeline. Go get 'em!

Bu egzersiz

ETL and ELT in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Update the transform() function to call the .execute() method on the data_warehouse object.
  • Use the newly-updated transform() function to populate data in the total_sales target table by transforming data in the raw_sales_data source table.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Complete building the transform() function
def transform(source_table, target_table):
  data_warehouse.____(f"""
  CREATE TABLE {target_table} AS
      SELECT
          CONCAT("Product ID: ", product_id),
          quantity * price
      FROM {source_table};
  """)

extracted_data = extract(file_name="raw_sales_data.csv")
load(data_frame=extracted_data, table_name="raw_sales_data")

# Populate total_sales by transforming raw_sales_data
____(source_table="____", target_table="____")
Kodu Düzenle ve Çalıştır