<?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>topic Re: Update  Values in enrichment_json in Fraud, AML and Security Intelligence</title>
    <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873579#M896</link>
    <description>&lt;P&gt;A json is just a text file. You need to either read it into SAS, change the value and then recreate the json OR you just treat it as text file where you read it as string and do a simple text replace using string functions.&amp;nbsp;&lt;BR /&gt;If using SAS for directly changing the text file one would need to know if you have line delimiters (LF ?) or if the whole json is on a single line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 09:59:32 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-05-03T09:59:32Z</dc:date>
    <item>
      <title>Update  Values in enrichment_json</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873563#M895</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dears,&lt;/P&gt;
&lt;P&gt;Hope this email finds you well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to change only the aging values in the enrichment_json_doc column of tdc_alert?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;As given below I want to update the aging values in the tdc_alert table every day, but the rest of the values stored in the enrichment_json_doc column should remain the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{"aging": "31 Days", "branch_name": ".", "customer_name": ".", "customer_type": ".", "sender_number": "c_num", "customer_number": ".", "transaction_number": ".", "reason_for_suspension": "."}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your attention to this matter.&lt;/P&gt;
&lt;P&gt;Deepak&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>Wed, 03 May 2023 08:54:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873563#M895</guid>
      <dc:creator>chaudharydeepak</dc:creator>
      <dc:date>2023-05-03T08:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update  Values in enrichment_json</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873579#M896</link>
      <description>&lt;P&gt;A json is just a text file. You need to either read it into SAS, change the value and then recreate the json OR you just treat it as text file where you read it as string and do a simple text replace using string functions.&amp;nbsp;&lt;BR /&gt;If using SAS for directly changing the text file one would need to know if you have line delimiters (LF ?) or if the whole json is on a single line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 09:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873579#M896</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-05-03T09:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Update  Values in enrichment_json</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873587#M897</link>
      <description>&lt;P&gt;Dear Patrick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a data set and in the data, I do have a column as JSON, in which I need to update the record.&lt;/P&gt;
&lt;P&gt;If you can share the scripts, it will be a great help if you could share?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 11:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873587#M897</guid>
      <dc:creator>chaudharydeepak</dc:creator>
      <dc:date>2023-05-03T11:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update  Values in enrichment_json</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873593#M898</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/230436"&gt;@chaudharydeepak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Patrick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a data set and in the data, I do have a column as JSON, in which I need to update the record.&lt;/P&gt;
&lt;P&gt;If you can share the scripts, it will be a great help if you could share?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If that's a SAS table then use SAS string functions to replace the value. If you can search for a fixed string and replace it with another fixed string then code as below should do.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  json_column='{"aging": "31 Days", "branch_name": ".", "customer_name": ".", "customer_type": ".", "sender_number": "c_num", "customer_number": ".", "transaction_number": ".", "reason_for_suspension": "."}';
  json_column=transtrn(json_column,'"aging": "31 Days"','"aging": "40 Days"');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need to search for a text pattern like "aging": "&lt;STRONG&gt;??&lt;/STRONG&gt; Days" and replace it with something variable then getting the string functions right could take a bit more but is still very doable.&lt;BR /&gt;You will have to provide representative sample data that cover all your cases and then explain what you have and what you need - like that we need to take the aging value as found in the data and increase it by 1. You would in such a case also need to be clear if there could be no value and if that would mean we've got a dot instead ...and if we then would need to set the value to 1 or leave it "missing". ....stuff like that you need to tell us in detail.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 11:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Update-Values-in-enrichment-json/m-p/873593#M898</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-05-03T11:53:38Z</dc:date>
    </item>
  </channel>
</rss>

