Support Questions

Find answers, ask questions, and share your expertise

Unable to find CANVAS Processors/ControlerSercives IDs on exported XML template.

avatar
Explorer

Hi, this has been troubling for months..

I simply can't find any CANVAS ID (Processor or ControllerService)  on the exported XML template 😞

 

Example - on my canvas I see :

Name
PutS3Object
Id
0c6637cc-bea1-1c43-a023-921b68e400f5
Type
PutS3Object 1.0.0
 
Now i created template for the PG, and theres no 0c6637cc-bea1-1c43-a023-921b68e400f5 on the xml ?!
 
This is very annoying, why i can't see any IDs on canvas on the exported xml ?
 
We have cluster of 3 nodes and PG is versioned on NiFi registry.
 
Any suggestions in how to locate on XML template any Processor or ControllerService using their ID as visible on canvas editor ?
 
Thanks,
Emanuel O.
1 ACCEPTED SOLUTION

avatar
Master Mentor

@emanueol 

 

The intent of templates was to allow users to create re-useable dataflows or distribute dataflows to another NiFi installation. Since you can not have more than one component with the same uuid, the uuids are randomized when both creating the template and each time the components from a template are instantiated to the canvas.  

The best way to identify your component in the xml is by uniquely naming your components.  By default a components name will be the same as the component type; however, users can modify the name to whatever they like.

 

Hope this helps,

Matt

View solution in original post

8 REPLIES 8

avatar
Explorer

This is really very basic question, Im surprised it doenst get answers..

Im just wondering if it is normal or not, that a NiFi processor id doesnt exist on the xml after we export processor group as template and download it ?

 

Thanks in advance.

avatar
Super Guru

Are you templating the Process Group?    Or are you selecting multiple items on the main canvas and creating a template?

 

Without answers to those questions, I can definitely say that if you multi select PGs, Procs, Queues, etc, they should all be found in the template.   However, sometimes Controller Services do not make it into the template.   I usually create these Controller Services at the root level, and leave them there.  I then create all my work in Process Group, template and version this PG.   

 

In the future to help others comment,  you should provide screen shots showing your method of templating, and maybe even showing the template contents (if small enough).  Also Nifi Version, and other important information.  Then we are more prepared to make official answers.

avatar
Explorer

Hi Steve, seems theres no way to paste screenshots (as I tried), seems i need to find a public server to host the screenshots prior to update my post.

Will do that soon..

 

Meawhwile some answers/more detail:

  1. simple PG with no sub PGs, just processors+controllers+PG vars.
  2. anyway, doenst matter if i export PG or PG contents as xml template, i cant find any id's anyway.
  3. NiFi version (cluster of 3 nodes)
    1.8.0
    10/22/2018 23:48:30 EDT

    Tagged nifi-1.8.0-RC3

 

As soon I figured out a public server where I can host images, I will post full detailed request.

But anyway and again.. its really basic problem.. IDs on xml template dont match whatever IDs I see on editor (canvas), no matter if i export full PG or just a bunch of processors.

avatar
Super Guru

Thank you for the deeper info.

 

I created a template, opened the xml, grabbed a randomn ID, then search for it in NiFI ui,  NO MATCH.

 

I then went to do a match specifically from flow to template.

 

Flow ID:  1b694005-09dd-1382-0000-000032678b58

Template ID:  c4e8f083-508c-3471-0000-000000000000

 

 

 

I think what you are experiencing is normal NiFi behavior.   The IDs are not going to persist, or be equal as you move a template to different environments.   This may be indicated by noticing that all of the IDs in the template are 00000000ed out.

 

 

 

avatar

Hi @emanueol, glad you found an answer to your question.

Just for future reference, it is possible for members of this community to include screen shots with their questions without relying on a public server to host them.

 

In the editor you use for composing your question, click the "camera" icon and you'll be allowed to upload a photo in any one of a few different formats. Here's an example that I produced from taking a screen shot of the editor:

 

partial page shot showing reply editor in community captured 2019-12-04_18-19-26.jpg

 

...if you're still experiencing issues with uploading images, please send me a private message and let me know.

 

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer
Ok thats good, and how to attach file like xml is it possible to upload it
as well or its just images?

Thanks in advance,
Emanuel Oliveira

avatar

@emanueol as of this writing, I believe that XML attachments aren't allowed, but you can cut and paste the XML source code into the body of a post using the Insert/edit code sample feature of the editor.

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Master Mentor

@emanueol 

 

The intent of templates was to allow users to create re-useable dataflows or distribute dataflows to another NiFi installation. Since you can not have more than one component with the same uuid, the uuids are randomized when both creating the template and each time the components from a template are instantiated to the canvas.  

The best way to identify your component in the xml is by uniquely naming your components.  By default a components name will be the same as the component type; however, users can modify the name to whatever they like.

 

Hope this helps,

Matt