question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ifelse introduces Merge task in visualization and flow in 0.10.2

See original GitHub issue

Description

A clear description of the bug

Version 0.10.2 – and carried into 0.10.3 – introduced an explicit Merge in the visualization.

2020-04-21 11_54_47-ETL Example - Jupyter Notebook - Prefect 0 10 2

Expected Behavior

What did you expect to happen instead?

I expected a single Merge as I defined it as merged_result:

Tested in 0.9.8 and 0.10.1: 2020-04-21 11_52_54-ETL Example - Jupyter Notebook - Prefect 0 9 8

Reproduction

A minimal example that exhibits the behavior.

Given this code:

from prefect import task, Flow
from prefect.tasks.control_flow import ifelse, merge

@task
def poll_for_new_records():
    pass

@task
def is_poll_result_empty(polled_data):
    if polled_data:
        return True
    else:
        return False

@task
def skip_right_past_it_all():
    pass

@task
def extract():
    pass

@task
def transform(payload):
    pass

@task
def load(payload):
    pass

with Flow("Test ETL") as flow:

    p = poll_for_new_records()

    e = extract()
    ifelse(is_poll_result_empty(p), skip_right_past_it_all, e)

    t = transform(e)
    l = load(t)

    merged_result = merge(skip_right_past_it_all, l)

flow.visualize()

Environment

Any additional information about your environment Anaconda, with an environment of Python 3.7, and Prefect 0.9.1 through 0.10.3 tested.

Optionally run prefect diagnostics from the command line and paste the information here { “config_overrides”: {}, “env_vars”: [], “system_information”: { “platform”: “Windows-10-10.0.18362-SP0”, “prefect_version”: “0.10.3”, “python_version”: “3.7.7” } }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
staylorxcommented, Apr 21, 2020

Happy to help @cicdw and @jcrist if/when I can. My team and I have really glommed on to this tool; thank you for the hard work and rapid turnaround.

1reaction
dojedacommented, Apr 23, 2020

Thanks for the quick responses by the prefect team and collaborators!

Read more comments on GitHub >

github_iconTop Results From Across the Web

New conditional api · Issue #2381 · PrefectHQ/prefect - GitHub
The current conditional api ( switch , ifelse , and merge ) work, ... Ifelse introduces Merge task in visualization and flow in...
Read more >
Changelog - Prefect Docs
#5443; Update Flow.visualize() to allow change in orientation. ... Allow passing kwargs to Merge task constructor via merge() function - # ...
Read more >
Release Notes — Qiskit 0.37.0 documentation
Qiskit Metapackage Version qiskit‑terra qiskit‑aer qiskit‑ignis qiskit‑ibmq‑provider Release... 0.37.0 0.21.0 0.10.4 0.19.2 2022‑06... 0.36.2 0.20.2 0.10.4 0.7.1 0.19.1 2022‑05... 0.36.1 0.20.1 0.10.4 0.7.0 0.19.1 2022‑04...
Read more >
4 Restructuring Data for Use in Graphs
4 Restructuring Data for Use in Graphs. So far we have learned how to define and visualize graphs to allow us to work...
Read more >
Apache Kafka's Mirror Maker | Confluent Platform 3.2.2
Apache Kafka's Mirror Maker¶. MirrorMaker is a stand-alone tool for copying data between two Apache Kafka clusters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found