nipyapi icon indicating copy to clipboard operation
nipyapi copied to clipboard

Export nested versioned process-groups from Registry

Open colinfindlay-nz opened this issue 7 years ago • 4 comments

  • 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.

colinfindlay-nz avatar Aug 15 '18 23:08 colinfindlay-nz

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 avatar Aug 16 '18 14:08 Chaffelson

@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...

colinfindlay-nz avatar Aug 23 '18 09:08 colinfindlay-nz

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.

Chaffelson avatar Aug 28 '18 15:08 Chaffelson

are we doing this enhancement?

charu123409 avatar Aug 17 '20 10:08 charu123409

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.

Chaffelson avatar Oct 22 '23 10:10 Chaffelson