<?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: Managing Common Data Model in SAS Customer Intelligence</title>
    <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/302944#M247</link>
    <description>&lt;P&gt;UDF tables contain custom details of a communication node. In my test cases both have records on them (Key: COMMUNICATION_SK).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Probably the problem is the CI_PACKAGE table. For each campaign there 's 1 package_sk for all cell_package_sk genereted by multiple campaing's run.&amp;nbsp;So if I have a campaign with 1&amp;nbsp;cell_package_sk&amp;nbsp; no problem&amp;nbsp;, but&amp;nbsp;it's impossible&amp;nbsp;delete&amp;nbsp;the package_sk from CI_PACKAGE if&amp;nbsp; there are other cell_package_sk with the same&amp;nbsp;package_sk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem doesn't occour if I delete all cell_package_sk.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 13:46:25 GMT</pubDate>
    <dc:creator>teresa_abbate</dc:creator>
    <dc:date>2016-10-06T13:46:25Z</dc:date>
    <item>
      <title>Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301292#M236</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm creating an sql procedure for&amp;nbsp;deleting old data&amp;nbsp;on common data&amp;nbsp;model.&amp;nbsp;In particular, the request is&amp;nbsp;just for some CELL_PACKAGE_SK of a communication.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the deleting table order is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CI_CONTACT_HISTORY&lt;/P&gt;&lt;P&gt;CI_RESPONSE_HISTORY&lt;/P&gt;&lt;P&gt;CI_CELL_PACKAGE&lt;/P&gt;&lt;P&gt;CI_COMMUNICATION_CHAR_UDF&lt;/P&gt;&lt;P&gt;CI_COMMUNICATION_DATE_UDF&lt;/P&gt;&lt;P&gt;CI_COMMUNICATION_NUM_UDF&lt;/P&gt;&lt;P&gt;CI_COMMUNICATION_EXT&lt;/P&gt;&lt;P&gt;CI_COMMUNICATION&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works if a communication has 1 cell_package_sk, but if&amp;nbsp; it has 2 or more cell_package_sk the procedure generates an oracle error for the foreign key violation on CI_CELL_PACKAGE table:&lt;/P&gt;&lt;P&gt;Error SQL: ORA-02292: integrity constraint (CAMPAIGN.CELL_PKG_FK1) violated - child record found&lt;/P&gt;&lt;P&gt;Do you have some suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Teresa&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 14:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301292#M236</guid>
      <dc:creator>teresa_abbate</dc:creator>
      <dc:date>2016-09-28T14:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301458#M237</link>
      <description>&lt;P&gt;I don't have access to this data model in particular.&lt;/P&gt;
&lt;P&gt;But the basic principle is to do deletes in the "child" tables first, the tables that have FK:s.&lt;/P&gt;
&lt;P&gt;And then the tables with PK:s.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 08:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301458#M237</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-09-29T08:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301518#M238</link>
      <description>Can you provide more detail about the criteria you are using to delete the&lt;BR /&gt;"old" data?&lt;BR /&gt;&lt;BR /&gt;A scenario where I think you're having trouble is this: You're deleting&lt;BR /&gt;subjects from a campaign with a contact_dt of 09/29/2016 that are attached&lt;BR /&gt;to one cell_package_sk. There may be subjects from the same campaign and&lt;BR /&gt;communication that have a contact date of 10/1. Since those agents exist&lt;BR /&gt;the cell_package_sk would not be purged. The communication would then have&lt;BR /&gt;a child cell_package_sk that still exists.&lt;BR /&gt;&lt;BR /&gt;If that's the case then your script should delete records from CDM where&lt;BR /&gt;the campaign has no subjects in it's contact history that have not yet made&lt;BR /&gt;the threshold to be purged. ​&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Thu, 29 Sep 2016 13:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301518#M238</guid>
      <dc:creator>pcapazzi</dc:creator>
      <dc:date>2016-09-29T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301754#M240</link>
      <description>&lt;P&gt;The scenario is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN1 --&amp;gt; CAMPAIGN_CD=CAMP1111 COMMUNICATION_CD=COMM2111 CELL_PACKAGE_SK=1110 COMMUNICATION_SK=2111&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN2 --&amp;gt; CAMPAIGN_CD=CAMP1111 COMMUNICATION_CD=COMM2111 CELL_PACKAGE_SK=1120 COMMUNICATION_SK=2112&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUBJECT&amp;nbsp;PER RUN:&lt;/P&gt;&lt;P&gt;RUN1: 3000 SUBJECTS FOR CELL_PACKAGE_SK=1110&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN2: 5000 SUBJECTS FOR CELL_PACKAGE_SK=1120&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aim: deleting CELL_PACKAGE_sK=1110 and its subjects from common data model tables.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 13:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301754#M240</guid>
      <dc:creator>teresa_abbate</dc:creator>
      <dc:date>2016-09-30T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301791#M241</link>
      <description>&lt;P&gt;What is the definition of the constraint?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 16:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/301791#M241</guid>
      <dc:creator>pcapazzi</dc:creator>
      <dc:date>2016-09-30T16:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/302271#M242</link>
      <description>&lt;P&gt;Like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt;&amp;nbsp;I don't know the specific data model - but "extrapolating" from the table names I'd assume ..._udf stand for "user defined field" and columns in these tables seem to have a foreign key constraint on the parent table&amp;nbsp;&lt;SPAN&gt;CI_CELL_PACKAGE.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my assumption is correct then not every record in&amp;nbsp;CI_CELL_PACKAGE has a child record in the ...udf tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Assumptions&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- "&lt;EM&gt;It works if a communication has 1 cell_package_sk&lt;/EM&gt;": You've chosen test cases with no child records in one of the ...udf tables, so it's not about one or several sk's but about your test cases.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- "&lt;SPAN&gt;but if&amp;nbsp; it has 2 or more cell_package_sk the procedure generates an oracle error&lt;/SPAN&gt;": here you've got test cases with child records&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Most likely solution&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You need first to delete the child records in the ...udf tables before you can delete the parent in CI_CELL_PACKAGE. That's what the integrity constraint checks for.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Linus asked you for the constraint definition as this one tells you in which table you need to delete records first.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 06:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/302271#M242</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-04T06:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Managing Common Data Model</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/302944#M247</link>
      <description>&lt;P&gt;UDF tables contain custom details of a communication node. In my test cases both have records on them (Key: COMMUNICATION_SK).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Probably the problem is the CI_PACKAGE table. For each campaign there 's 1 package_sk for all cell_package_sk genereted by multiple campaing's run.&amp;nbsp;So if I have a campaign with 1&amp;nbsp;cell_package_sk&amp;nbsp; no problem&amp;nbsp;, but&amp;nbsp;it's impossible&amp;nbsp;delete&amp;nbsp;the package_sk from CI_PACKAGE if&amp;nbsp; there are other cell_package_sk with the same&amp;nbsp;package_sk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem doesn't occour if I delete all cell_package_sk.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 13:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Managing-Common-Data-Model/m-p/302944#M247</guid>
      <dc:creator>teresa_abbate</dc:creator>
      <dc:date>2016-10-06T13:46:25Z</dc:date>
    </item>
  </channel>
</rss>

