Hi all! Is there an example of a reference workfl...
# ask-the-community
j
Hi all! Is there an example of a reference workflow with an output value being used? I am trying to use a reference workflow and getting the following error when trying to register it:
Copy code
Failed with Unknown Exception <class 'flytekit.core.type_engine.TypeTransformerFailedError'> Reason: Python value cannot be None, expected <class 'int'>/<FlyteLiteral simple: INTEGER>
Here is my code referencing the workflow (this matches the inputs/output types for the referenced version of
common.workflow.ingest
):
Copy code
@reference_workflow(
    project="[]",
    domain="development",
    name="common.workflow.ingest",
    version="[]",
)
@workflow
def ingest(kickoff_time: datetime.datetime, report_type_id: int) -> int:
    ...
Thank you!
y
[] means redacted right?
j
That is correct, should have specified
y
remove @workflow?
you don’t need both i’m pretty sure
j
Ah that's it! Thank you
glad it was an easy answer
(and to confirm, this was documented w/ the correct syntax, error on my part: https://docs.flyte.org/projects/flytekit/en/latest/generated/flytekit.reference_workflow.html )
y
ah nice