I am using kedro to make some comparative analysis.
I am using the quarto python package providing a wrapper to the quarto cli through the render function. This function will take a qmd file as input and generate a html report from it while computing python chunks.
In a quarto report I have some chunks containing evaluation of output_var1
and output_var2
for example:
plot_function(output_var1)
plot_function(output_var2)
where output_var1 and output_var2 are pandas data frame for example (could be any type of data)
At the end of the pipeline, I would like to compute my report with quarto using the outcome of my pipeline, without saving it to the data catalog.
from quarto import render
def create_pipeline(**kwargs) -> Pipeline:
return pipeline([node(func=function1,
inputs='my_input',
outputs="output_var1"),
node(func=function2,
inputs='my_input',
outputs="output_var2"),
node(func=render,
inputs='params:my_quarto_report', # path to a quatro report *.qmd
outputs=None))])
In this example my_input
is described in the data catalog but not output_var1
nor output_var2
.
The above example fails, because I don't know how to pass output_var1 and output_var2 to quarto. How could this be done? Does quarto have a way to pass complex variables such as dataframe ? I have understand how to pass simple text or numerical variables but I don't see how to pass something which do not fit on the command line.