<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Help with UpdateRecord or QueryRecord in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372627#M241319</link>
    <description>&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;hope someone can point me on the right direction.&lt;/P&gt;&lt;P&gt;I have something like that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[ {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490010",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490011",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490012",
    "shipment_number" : ""
} ]&lt;/LI-CODE&gt;&lt;P&gt;I need to update only a specific record with a met condition.&lt;/P&gt;&lt;P&gt;Speaking on a SQL language it should be something like that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE FLOWFILE SET shipment_number = '${Shipment_Number_Attribute} ' WHERE barcode = '${Barcode_Attribute}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this statement in QueryRecord doesn't work, maybe UPDATE not supported?&lt;/P&gt;&lt;P&gt;Moreover is there any way to achieve the same with UpdateRecord?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any help.&lt;/P&gt;&lt;P&gt;Appreciate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 21:17:39 GMT</pubDate>
    <dc:creator>Ray82</dc:creator>
    <dc:date>2023-06-14T21:17:39Z</dc:date>
    <item>
      <title>Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372627#M241319</link>
      <description>&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;hope someone can point me on the right direction.&lt;/P&gt;&lt;P&gt;I have something like that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[ {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490010",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490011",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490012",
    "shipment_number" : ""
} ]&lt;/LI-CODE&gt;&lt;P&gt;I need to update only a specific record with a met condition.&lt;/P&gt;&lt;P&gt;Speaking on a SQL language it should be something like that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE FLOWFILE SET shipment_number = '${Shipment_Number_Attribute} ' WHERE barcode = '${Barcode_Attribute}'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this statement in QueryRecord doesn't work, maybe UPDATE not supported?&lt;/P&gt;&lt;P&gt;Moreover is there any way to achieve the same with UpdateRecord?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any help.&lt;/P&gt;&lt;P&gt;Appreciate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 21:17:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372627#M241319</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-14T21:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372636#M241326</link>
      <description>&lt;P&gt;Where is the barcode attribute coming from?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 22:14:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372636#M241326</guid>
      <dc:creator>joseomjr</dc:creator>
      <dc:date>2023-06-14T22:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372726#M241361</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99747"&gt;@Ray82&lt;/a&gt;&amp;nbsp;Yes, you can achieve this with UpdateRecord.&amp;nbsp;You will need to provide record reader/writer with schema of your upstream and downstream.&amp;nbsp; Then in UpdateRecord you explicitly add properties (+) for each record value you want to update versus using a SQL statement like QueryRecord.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some useful community posts on this topic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Update-the-Contents-of-FlowFile-by-using-UpdateRecord/ta-p/248267" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Community-Articles/Update-the-Contents-of-FlowFile-by-using-UpdateRecord/ta-p/248267&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/NiFi-UpdateRecord-processor-is-not-updating-JSON-path/m-p/186256" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Support-Questions/NiFi-UpdateRecord-processor-is-not-updating-JSON-path/m-p/186256&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 16:37:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372726#M241361</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-06-15T16:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372736#M241366</link>
      <description>&lt;P&gt;Barcode is an attribute coming from each fragment...different on any fragment.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 20:29:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372736#M241366</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-15T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372737#M241367</link>
      <description>&lt;P&gt;Sure I Kwon this....the question is how to add a where clause in Updare Record or QueryRecord .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In QueryRecord I ve tried an Update statement with no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will giving me always an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 20:31:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372737#M241367</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-15T20:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372738#M241368</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont think what you are trying to do can be achieved with UpdateRecord, the reason being that the UpdateRecord you have to define a record path where the specific record\attribute have to be static and cannot take any variable like a flowfile attribute. For example lets say you want to update record with barcode "C337287V28490011" , then record path property would be defined as the following which would work :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*[/barcode='C337287V28490012']/shipment_number&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you &lt;STRONG&gt;cannot&lt;/STRONG&gt; define the record path like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*[/barcode='${Barcode_Attribute}']/shipment_number&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I can think of where you can accomplish this in one processor is to use the JoltTransformationJSON processor. Jolt is a transformation language for json and its very powerful. In this processor you set the "&lt;STRONG&gt;Jolt Specification&lt;/STRONG&gt;" property with the following spec:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "*": {
        "barcode": {
          "${Barcode_Attribute}": {
            "$": "[&amp;amp;3].barcode",
            "@(2,date)": "[&amp;amp;3].date",
            "#${Shipment_Number_Attribute}": "[&amp;amp;3].shipment_number",
            "@(2,reference)": "[&amp;amp;3].reference"
          },
          "*": {
            "$": "[&amp;amp;3].barcode",
            "@(2,date)": "[&amp;amp;3].date",
            "@(2,shipment_number)": "[&amp;amp;3].shipment_number",
            "@(2,reference)": "[&amp;amp;3].reference"
          }
        }
      }
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice how you can use Expression Language in the Jolt Spec where you can specify flowfile attributes as well. For more information on Jolt Spec you can refer to the following:&lt;/P&gt;&lt;P&gt;&lt;A href="https://jolt-demo.appspot.com/#inception" target="_blank" rel="noopener"&gt;https://jolt-demo.appspot.com/#inception&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://intercom.help/godigibee/en/articles/4044359-transformer-getting-to-know-jolt" target="_blank" rel="noopener"&gt;https://intercom.help/godigibee/en/articles/4044359-transformer-getting-to-know-jolt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that helps &lt;STRONG&gt;please&lt;/STRONG&gt; accept solution,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 21:28:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372738#M241368</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-06-15T21:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372739#M241369</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Actually, I just found out that you can achieve what you need using QueryRecord processor by defining&amp;nbsp; the query Relation Property with the following query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select reference,barcode,"date",
case when barcode = '${Barcode_Attribute}' then '${Shipment_Number_Attribute}'
else shipment_number end as shipment_number
from flowfile&lt;/LI-CODE&gt;&lt;P&gt;The Json Jolt transformation above still works but its more complicated and probably less efficient.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 22:09:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372739#M241369</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-06-15T22:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372805#M241381</link>
      <description>&lt;P&gt;Well, i'm not sure this query is exactly what i'm searching for.&lt;/P&gt;&lt;P&gt;Speaking in a human way this is what i need to do:&lt;/P&gt;&lt;P&gt;Search the element with barcode=${barcode_attribute} and if found update corresponding "shipment_number" value with ${shipment_number_attribute}, otherwise leave it as it is.&lt;/P&gt;&lt;P&gt;So this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[ {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490010",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490011",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490012",
    "shipment_number" : ""
} ]&lt;/LI-CODE&gt;&lt;P&gt;would becomes as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[ {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490010",
    "shipment_number" : "0000023/SH"
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490011",
    "shipment_number" : ""
}, {
    "reference" : "PB",
    "date" : "20230613",
    "barcode" : "C337287V28490012",
    "shipment_number" : ""
} ]&lt;/LI-CODE&gt;&lt;P&gt;Trying your query seems that does not update shipment_number field.&lt;/P&gt;&lt;P&gt;Hope this can explain better the need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 13:44:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372805#M241381</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-16T13:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372809#M241382</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99747"&gt;@Ray82&lt;/a&gt;&amp;nbsp;- I tested out&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;solution quickly and it worked for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure in QueryRecord you are referencing the right attribute names.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 14:05:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372809#M241382</guid>
      <dc:creator>drewski7</dc:creator>
      <dc:date>2023-06-16T14:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372813#M241383</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99747"&gt;@Ray82&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its hard to predict how this is going to work without understanding the full data flow you have, so I had to come up with simple flow to test the query which worked for me as expected. Please see the my flow below and each processor configuration to get the expected result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data Flow:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_0-1686923883329.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37872i5C4A6D5DC8243851/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_0-1686923883329.png" alt="SAMSAL_0-1686923883329.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Generate Input Josn&lt;/STRONG&gt;: GenerateFlowFile processor to produce the Input json as you provided and provide the query attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_1-1686924018255.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37873iF09937E855D618C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_1-1686924018255.png" alt="SAMSAL_1-1686924018255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) QueryRecord:&lt;/STRONG&gt; Run the Query provided above to generate expected result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_2-1686924189484.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37874i2E87E3A59E337D4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_2-1686924189484.png" alt="SAMSAL_2-1686924189484.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Notice&lt;/STRONG&gt; &lt;/U&gt;that you need to connect the &lt;STRONG&gt;QueryRelationship&lt;/STRONG&gt; "QueryRel" to downstream processor to get the expected output and &lt;U&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp; the &lt;STRONG&gt;original&lt;/STRONG&gt; relationship:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_3-1686924439882.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37875i5EC53749CAABFC59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_3-1686924439882.png" alt="SAMSAL_3-1686924439882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After running the DataFlow above and getting the output in the QueryRel&amp;nbsp; relationship queue , the output looks like as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_4-1686924553215.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37876i4C5C58CAAAFE6949/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_4-1686924553215.png" alt="SAMSAL_4-1686924553215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice to get the out put as an array the JsonRecordWrite in the QueryRecord RecordWriter is configured as the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAMSAL_5-1686924659704.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37877iCD91B38FA578B6E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAMSAL_5-1686924659704.png" alt="SAMSAL_5-1686924659704.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Like I said in the beginning everything depends at the end on your overall dataflow and how you are getting the data , attributes and in what format. The details above hopefully can guide you in case you are missing something or figure out what is making this not working in your case. Also be aware that Im using version 1.20.0 so also depending what version you are using the behavior can be different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 14:19:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372813#M241383</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-06-16T14:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372826#M241387</link>
      <description>&lt;P&gt;OK , i've found the problem.&lt;/P&gt;&lt;P&gt;My query was:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;select *,
case when F3BARC_BarcodeSegnacollo = '${barcode}' then '${Shipment_Number}'
else F3SPNU_NumSpedizione end as F3SPNU_NumSpedizione
from flowfile&lt;/LI-CODE&gt;&lt;P&gt;But fields selection won't have field in else statement like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;select F3BARC_BarcodeSegnacollo,
case when F3BARC_BarcodeSegnacollo = '${barcode}' then '${Shipment_Number}'
else F3SPNU_NumSpedizione end as F3SPNU_NumSpedizione
from flowfile&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to make a select *? I have lots of fields to select.&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 16:41:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372826#M241387</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-16T16:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372829#M241390</link>
      <description>&lt;P&gt;Moreover,&lt;/P&gt;&lt;P&gt;how to assign multiple values when the case matches?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;select *,
case when F3BARC_BarcodeSegnacollo = '${barcode}' then '${Shipment_Number},${Shipment_Date},${Document_Date}'
else 
F3SPNU_NumSpedizione end as F3SPNU_NumSpedizione
F3SPNU_DataSpedizione end as F3SPNU_DataSpedizione
F3SPNU_NumDocumento end as F3SPNU_NumDocumento
from flowfile&lt;/LI-CODE&gt;&lt;P&gt;Many Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 17:07:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372829#M241390</guid>
      <dc:creator>Ray82</dc:creator>
      <dc:date>2023-06-16T17:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372832#M241393</link>
      <description>&lt;P&gt;You either have to select each column one by one to have the same column name you are trying to update in the case statement, or select * but create different column for the case statement and then use jolt transformation to write the value back to the original column.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 18:14:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372832#M241393</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-06-16T18:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with UpdateRecord or QueryRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372833#M241394</link>
      <description>&lt;P&gt;You have to create a separate case statement for each column you are trying to update similar to what&amp;nbsp; is done for the shipment number.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 18:26:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Help-with-UpdateRecord-or-QueryRecord/m-p/372833#M241394</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-06-16T18:26:51Z</dc:date>
    </item>
  </channel>
</rss>

