Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cookbook: reusing tasks #680

Open
edublancas opened this issue Mar 24, 2022 · 0 comments
Open

cookbook: reusing tasks #680

edublancas opened this issue Mar 24, 2022 · 0 comments

Comments

@edublancas
Copy link
Contributor

edublancas commented Mar 24, 2022

we've been getting the question of re-using tasks a few times now, this is possible turning extract_upstream off, we should add a cookbook:

# pipeline.yaml
meta:
  extract_upstream: false

tasks:
  - source: task.py
    name: task-a
    products: ...
    upstream [another]

  - source: task.py
    name: task-b
    products: ...
    upstream [a-different-one]

Also, show how to use .first in function tasks

def drop_columns(upstream, product):
    train = pd.read_csv(upstream.first["train"])
    holdout = pd.read_csv(upstream.first["holdout"])
    # cleaning....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant