Hi Team! :kedro: In Kedro, while running pipeline...
# questions
a
Hi Team! K In Kedro, while running pipeline from the cmd line, is there a way to do the following: 1. Run pipeline except certain tags (exclude them) 2. Run pipeline with certain tag combinations only 3. Run pipeline except certain tag combinations
m
Hi @Abhishek Bhatia, I think this documentation page answers most of your questions: https://docs.kedro.org/en/stable/development/commands_reference.html#run-the-project šŸ™‚
a
Thanks @Merel. From the docs, none of the 3 points seem possible from the cmd line though šŸ™
m
"kedro run --tags=<tag_name1>,<tag_name2> Run only nodes which have any of these tags attached."
a
It will actually run nodes which have either
tag_name1
OR
tag_name2
. I want the possibility of AND condition as well
m
You mean you only want to run nodes that contain all tags specified?
a
Yes, in point 2. Otherwise, I sometimes to need to exclude certain nodes with tags as well (point 1 and 3)
m
Then perhaps you need to tag your nodes differently. Or maybe namespaces could be a way for you to separate pipelines better: https://docs.kedro.org/en/stable/nodes_and_pipelines/namespaces.html
a
Yep, heavily using namespaces too where it makes sense. I feel I would really like the freedom to do some AND/OR logic with some syntactic sugar implemented in kedro cmd line. But depends on how many people would like to have this functionality as well! šŸ™‚
šŸ‘šŸ¼ 1
something like: • For including and excluding tags
Copy code
kedro run --pipeline my_pipeline --tags "1,6" --except-tags "tag_B"
• For including and excluding tag combinations
Copy code
kedro run --pipeline my_pipeline --tags-comb "1,6" --except-tags-comb "tag_B,tag2"
m
I would wonder if there is a way to do this by customizing the cli
You can combined with customising the cli to achieve this as mentioned above ^