Hi All! quick question, previously in prefect vers...
# prefect-community
Hi All! quick question, previously in prefect version 0.14.17 a flow could be visualized as long as the package
was installed, but with the current version ,<2.3.1> , I'm having difficulties get some basic code to work - Could someone please assist? Thanks!
Copy code
import requests
from pprint import pprint as pp
from prefect import flow, task, Flow
import pandas as pd
import json

## extract

def get_data():
    r = requests.get("<https://rickandmortyapi.com/api/character/>")
    return r.json()

def transform(r: dict):
    df = pd.json_normalize(r["results"])

def write_frame(df: pd.DataFrame):

## This is the way to visualize flow before current version

with Flow("ETL") as flow:
    e = get_data()
    t = transform(e)
    l = write_frame(t)

def flow_test():
    e = get_data()
    t = transform(e)
    l = write_frame(t)
flow_test().visualize() # This doesn't work...
Prefect 2 is an entirely different product, check our docs at docs.prefect.io and https://www.prefect.io/guide/blog/the-global-coordination-plane/
in short, Prefect 2 doesn't have this kind of pre-run visualization feature as of today and to get a view of that, you could first run it locally with an ephemeral API and a testing profile before running your flows in production