Hi! :wave: I was a bit curious about `Output.all(...
# general
q
Hi! 👋 I was a bit curious about
Output.all()
, is there any way to access the outputs one wants in the lambda by name, instead of index? It quickly gets confusing with a more substantial piece of code like this one:
Copy code
environment = Output.all(
    databases["airflow"].address,  # 0
    databases["airflow"].password, # 1
    databases["grafana"].address,  # 2
    databases["grafana"].password, # 3
    databases["redata"].address,   # 4
    databases["redata"].password,  # 5
    base_url,                      # 6
    sd_namespace.name,             # 7
).apply(
    lambda args: [
        # Airflow DB
        {"name": "AIRFLOW_CONN_METADATA_DB", "value": f"<postgres+psycopg2://airflow:{args[1]}@{args[0]}:5432/airflow>"},
        {"name": "AIRFLOW_VAR__METADATA_DB_SCHEMA", "value": "airflow"},
        # Airflow Config
        {"name": "AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS", "value": "False"},
        {"name": "AIRFLOW__CORE__SQL_ALCHEMY_CONN", "value": f"<postgres+psycopg2://airflow:{args[1]}@{args[0]}:5432/airflow>"},
...
As you can see, I've taken to labeling each output with its index just to not get too lost.. 😅