शुरू करेंमुफ़्त में शुरू करें

zip के साथ इनपुट पेयर करना

आपकी टीम के पास एक पाइपलाइन है जो फ़ाइलों को चुने हुए क्लाउड स्टोरेज लोकेशन्स पर अपलोड करती है। एक सहकर्मी expand_kwargs() के साथ zip() का इस्तेमाल करके हर फ़ाइल को उसके क्लाउड स्टोरेज डेस्टिनेशन से पेयर करता/करती है:

@task
def get_files():
    return ["users.csv", "orders.csv", "products.csv"]

@task
def get_destinations():
    return ["s3://bronze/users/", "s3://bronze/orders/", "s3://bronze/products/"]

@task
def upload(file_to_upload):
    # Simulate uploading a file to cloud storage
    print(f"Uploading {file_to_upload[0]} to {file_to_upload[1]}")

files = get_files()
destinations = get_destinations()
upload.expand(file_to_upload=files.zip(destinations))

Airflow upload के कितने इंस्टेंस बनाएगा?

यह अभ्यास पाठ्यक्रम का हिस्सा है

Airflow के साथ Data Pipelines बनाना

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

हमारे इंटरैक्टिव अभ्यासों में से किसी एक के साथ सिद्धांत को व्यवहार में बदलें

अभ्यास शुरू करें