nipyapi
nipyapi copied to clipboard
Export nested versioned process-groups from Registry
- Nipyapi version: 0.10.0
- NiFi version: 1.7.1
- NiFi-Registry version: 0.3.0-SNAPSHOT
- Python version: 3ish
- Operating System: All
Description
When you import a PG into Nifi from a registry, you get the whole PG, and all nested; versioned PGs within it. I would have expected some way of achieving the same result from either the API, the toolkit, or nipyapi when doing an Export.
What I Did
If I export/get a flow via nipyapi - I only seem to get the top level flow, and just a pointer to the nested versioned PGs. Would be great if there was an option to recurse down the stack and get a fully working flow (in our case - for use in Minifi)
Urgency
Not super urgent - but would be nice to know what we can do.
Interesting requirement @colinfindlay-nz I can see a potential pathway recursing through the exported flow seeking the references and fetching/integrating them into the exported json. I'd think I'd just have to set up a test case and then work backwards to add a 'descendants' option to the exporter.
Do you have an example flow (in a Template perhaps) that I can use to prove it against your specific usecase? It would be better to use a sanitised but real example than a contrived one.
@Chaffelson Sorry - I don't have anything I am allowed to share 😞 The best I could do would be to knock up a contrived example...
Ok I think I can work up a limited contrived demo - there's edge cases we can't handle, like nested PGs coming from different registries that may not be available at time of execution, but I'll see what logic I can come up with.
are we doing this enhancement?
Based on my understanding of how the integrated version control with NiFi and Registry works, this kind of export being automated is a bad idea. There is instead an option to download the flow as a JSON document these days, which I believe is the preferred option.