<?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: Data Validation - DI - Count Records in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169073#M3297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For an empty table, you could use Status Handling instead - where you can specify an action based on if the target table was updated (or not).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 13:49:14 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-12-11T13:49:14Z</dc:date>
    <item>
      <title>Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169066#M3290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can use the COUNT function in Data Validation within DI Studio? &lt;/P&gt;&lt;P&gt;What´s the syntax? &lt;/P&gt;&lt;P&gt;I need to abort the job if the table has more than one record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 18:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169066#M3290</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-10T18:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169067#M3291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the top of my head:&lt;/P&gt;&lt;P&gt;The Data Validation Node creates SAS Data Step code and the rules are applied on row level. If so then you could use the automatic variable _N_ in an expression where you abort the job if: _N_&amp;gt;1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 20:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169067#M3291</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-10T20:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169068#M3292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To follow up on Patrick's suggestion, perhaps this example for a Data Validation transformation will give you an idea of how this transformation can be used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/etlug/65920/HTML/default/viewer.htm#n180c3x8ln74q5n1b3jxsaaoa6k4.htm" title="http://support.sas.com/documentation/cdl/en/etlug/65920/HTML/default/viewer.htm#n180c3x8ln74q5n1b3jxsaaoa6k4.htm"&gt;SAS(R) Data Integration Studio 4.7: User's Guide&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 20:41:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169068#M3292</guid>
      <dc:creator>DaveR_SAS</dc:creator>
      <dc:date>2013-12-10T20:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169069#M3293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or just add the check as a user-written code module? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this seen as "bad form" in DI Studio land?&amp;nbsp; I haven't done much with DI studio besides user-written code, so I'm curious if people often mix DI transformation nodes with user-written nodes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 20:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169069#M3293</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-12-10T20:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169070#M3294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best practice is to use user written code only if you can't do it with an existing transformation. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 22:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169070#M3294</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-10T22:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169071#M3295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THanks Patrick.&amp;nbsp; Rather than hijack this thread, I'll start another one relating to pros and cons of mixing the canned transformations with user written code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 03:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169071#M3295</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-12-11T03:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169072#M3296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need abort the job too when the table is empty. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the table has more than one record is working!&lt;/P&gt;&lt;P&gt;So, the table should have only one record for the job does not fail. &lt;STRONG&gt;(_N_ &amp;lt;&amp;gt; 1 did not work!)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 12:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169072#M3296</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-11T12:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169073#M3297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For an empty table, you could use Status Handling instead - where you can specify an action based on if the target table was updated (or not).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 13:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169073#M3297</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-12-11T13:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169074#M3298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, but I want in the data validation transformation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 13:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169074#M3298</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2013-12-11T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169075#M3299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 15:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169075#M3299</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-12-11T15:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data Validation - DI - Count Records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169076#M3300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you need to abort the job when the table exists but has &lt;STRONG&gt;0 records&lt;/STRONG&gt; (and not "more than 1 record"). That's something else.&lt;/P&gt;&lt;P&gt;Can't test it but doesn't the Data Validation node include a Status Handling tab with one of the default conditions being "Table truncated". You could use this one and if truncated then select action "abort all processes".&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/etlug/62233/HTML/default/viewer.htm#n0k609ykk0xxipn1b1561htnuphp.htm" title="http://support.sas.com/documentation/cdl/en/etlug/62233/HTML/default/viewer.htm#n0k609ykk0xxipn1b1561htnuphp.htm"&gt;SAS(R) Data Integration Studio 4.21: User's Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: You should always post the DIS version so we can know what's available to you "out-of-the-box".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 16:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Validation-DI-Count-Records/m-p/169076#M3300</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-11T16:31:03Z</dc:date>
    </item>
  </channel>
</rss>

