Hi everyone, I am working on a problem that requir...
# questions
j
Hi everyone, I am working on a problem that requires a conditional data output i.e. only when the parameter is set to True it should export the dataset else no. Is there a way I can incorporate the logic in kedro? Any help is highly appreciated!
n
Hey @jyoti goyal, could you explain more what you are trying to do? Quick answer is Kedro don’t encourage these kind of dynamic pipeline. If it’s necessary
hooks
may come to rescue but it should be use cautiously.
Can it be re-written into two separate static pipeline instead?
j
Yes, Nok. It can written to multiple nodes. But I wanted to minimize the number of pipelines and nodes. In that case, I believe an additional function will have to be written to trigger the nodes based on the parameter
Main question is - My current node outputs 4 dataframes out of which 2 are conditional on parameter being true (from parameters.yml file indicating if the datasets are required at all)
n
You may do that via conditional in the pipeline construction. You need to read the parameters file and create the node conditionally
j
makes sense. Thank you!