NIFI accessing Content Claim Identifier using GroovyNiFi-1.0.0 GetFile relatedMethod for collecting user input within NiFi topologynifi error flow not working unless two files in queueWrite attributes to a file in Apache NiFiNifi record the maximum timestampHow to pass json object as parameter to java method(supplied as a jar i ExecuteScript) from groovy in Nifi?Process nifi flow files present in incoming queue, all togetherApache-NiFi DetectDuplicate processor counterwhy nifi is loosing flowfile content?Nifi Processor gets triggered twice for single Input flow file

Can you describe someone as luxurious? As in someone who likes luxurious things?

What do the positive and negative (+/-) transmit and receive pins mean on Ethernet cables?

How to test the sharpness of a knife?

Friend wants my recommendation but I don't want to give it to him

Showing mass murder in a kid's book

Has the laser at Magurele, Romania reached a tenth of the Sun's power?

Sort with assumptions

What properties make a magic weapon befit a Rogue more than a DEX-based Fighter?

What is the tangent at a sharp point on a curve?

Is this saw blade faulty?

Unfrosted light bulb

Can you take a "free object interaction" while incapacitated?

Hashing password to increase entropy

Are hand made posters acceptable in Academia?

Did I make a mistake by ccing email to boss to others?

Strange behavior in TikZ draw command

How do you justify more code being written by following clean code practices?

Would this string work as string?

Magnifying glass in hyperbolic space

Why do Radio Buttons not fill the entire outer circle?

Calculate Pi using Monte Carlo

Travelling in US for more than 90 days

Output visual diagram of picture

Turning a hard to access nut?



NIFI accessing Content Claim Identifier using Groovy


NiFi-1.0.0 GetFile relatedMethod for collecting user input within NiFi topologynifi error flow not working unless two files in queueWrite attributes to a file in Apache NiFiNifi record the maximum timestampHow to pass json object as parameter to java method(supplied as a jar i ExecuteScript) from groovy in Nifi?Process nifi flow files present in incoming queue, all togetherApache-NiFi DetectDuplicate processor counterwhy nifi is loosing flowfile content?Nifi Processor gets triggered twice for single Input flow file













0















I need to generate a unique id each time my process runs. My process starts with GetSFTP processor.



I was thinking of using flowfile's Content Claim Identifier for this purpose.



How do access this using Groovy? Thanks in advance!



Flow File










share|improve this question


























    0















    I need to generate a unique id each time my process runs. My process starts with GetSFTP processor.



    I was thinking of using flowfile's Content Claim Identifier for this purpose.



    How do access this using Groovy? Thanks in advance!



    Flow File










    share|improve this question
























      0












      0








      0








      I need to generate a unique id each time my process runs. My process starts with GetSFTP processor.



      I was thinking of using flowfile's Content Claim Identifier for this purpose.



      How do access this using Groovy? Thanks in advance!



      Flow File










      share|improve this question














      I need to generate a unique id each time my process runs. My process starts with GetSFTP processor.



      I was thinking of using flowfile's Content Claim Identifier for this purpose.



      How do access this using Groovy? Thanks in advance!



      Flow File







      apache-nifi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 1:18









      Chris CChris C

      65




      65






















          1 Answer
          1






          active

          oldest

          votes


















          2














          In general, you can depend on the flowfile uuid attribute being unique. Each flowfile in the system generates this on creation, so the flowfiles coming from GetSFTP will have this attribute populated and unique. To access the uuid attribute from Groovy (in a script or custom processor), use the code flowfile.uuid or flowfile.getAttribute('uuid').



          The content claim identifier is definitely not unique -- it is a reference to a specific location on the file system (or other storage media if configured) referencing the content bytes of the flowfile. Many flowfiles can have the same content claim identifier.



          You can also generate a unique identifier using the UUID() function in Apache NiFi Expression Language and put this in an attribute or content as needed using interpolation (i.e. $UUID()).






          share|improve this answer























          • I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

            – Chris C
            Mar 7 at 9:19











          • Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

            – Chris C
            Mar 7 at 9:30










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034620%2fnifi-accessing-content-claim-identifier-using-groovy%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          In general, you can depend on the flowfile uuid attribute being unique. Each flowfile in the system generates this on creation, so the flowfiles coming from GetSFTP will have this attribute populated and unique. To access the uuid attribute from Groovy (in a script or custom processor), use the code flowfile.uuid or flowfile.getAttribute('uuid').



          The content claim identifier is definitely not unique -- it is a reference to a specific location on the file system (or other storage media if configured) referencing the content bytes of the flowfile. Many flowfiles can have the same content claim identifier.



          You can also generate a unique identifier using the UUID() function in Apache NiFi Expression Language and put this in an attribute or content as needed using interpolation (i.e. $UUID()).






          share|improve this answer























          • I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

            – Chris C
            Mar 7 at 9:19











          • Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

            – Chris C
            Mar 7 at 9:30















          2














          In general, you can depend on the flowfile uuid attribute being unique. Each flowfile in the system generates this on creation, so the flowfiles coming from GetSFTP will have this attribute populated and unique. To access the uuid attribute from Groovy (in a script or custom processor), use the code flowfile.uuid or flowfile.getAttribute('uuid').



          The content claim identifier is definitely not unique -- it is a reference to a specific location on the file system (or other storage media if configured) referencing the content bytes of the flowfile. Many flowfiles can have the same content claim identifier.



          You can also generate a unique identifier using the UUID() function in Apache NiFi Expression Language and put this in an attribute or content as needed using interpolation (i.e. $UUID()).






          share|improve this answer























          • I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

            – Chris C
            Mar 7 at 9:19











          • Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

            – Chris C
            Mar 7 at 9:30













          2












          2








          2







          In general, you can depend on the flowfile uuid attribute being unique. Each flowfile in the system generates this on creation, so the flowfiles coming from GetSFTP will have this attribute populated and unique. To access the uuid attribute from Groovy (in a script or custom processor), use the code flowfile.uuid or flowfile.getAttribute('uuid').



          The content claim identifier is definitely not unique -- it is a reference to a specific location on the file system (or other storage media if configured) referencing the content bytes of the flowfile. Many flowfiles can have the same content claim identifier.



          You can also generate a unique identifier using the UUID() function in Apache NiFi Expression Language and put this in an attribute or content as needed using interpolation (i.e. $UUID()).






          share|improve this answer













          In general, you can depend on the flowfile uuid attribute being unique. Each flowfile in the system generates this on creation, so the flowfiles coming from GetSFTP will have this attribute populated and unique. To access the uuid attribute from Groovy (in a script or custom processor), use the code flowfile.uuid or flowfile.getAttribute('uuid').



          The content claim identifier is definitely not unique -- it is a reference to a specific location on the file system (or other storage media if configured) referencing the content bytes of the flowfile. Many flowfiles can have the same content claim identifier.



          You can also generate a unique identifier using the UUID() function in Apache NiFi Expression Language and put this in an attribute or content as needed using interpolation (i.e. $UUID()).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 4:56









          AndyAndy

          8,26512449




          8,26512449












          • I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

            – Chris C
            Mar 7 at 9:19











          • Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

            – Chris C
            Mar 7 at 9:30

















          • I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

            – Chris C
            Mar 7 at 9:19











          • Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

            – Chris C
            Mar 7 at 9:30
















          I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

          – Chris C
          Mar 7 at 9:19





          I added a property called myId with the value $UUID() as suggested. But it gives me the following error: 'Myid' validated against '$UUID()' is invalid because 'Myid' is not a supported property or has no Validator associated with it.

          – Chris C
          Mar 7 at 9:19













          Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

          – Chris C
          Mar 7 at 9:30





          Also, the reason I can't use flowfile.uuid is because my GetSFTP can contain many flowfiles, but I am looking for a unique id every time my template is run.

          – Chris C
          Mar 7 at 9:30



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034620%2fnifi-accessing-content-claim-identifier-using-groovy%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко