<?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: STAR SCHEMA doen't run in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/710479#M767</link>
    <description>&lt;P&gt;The way I would eliminate the issues,&amp;nbsp;always best to use a bottom-up approach. Add complexity when the simple works.&lt;/P&gt;
&lt;P&gt;1. sample a few lines from your fact and dimensions that are supposed to join&lt;/P&gt;
&lt;P&gt;2. choose just one fact (some column types might pose issues in a view)&lt;/P&gt;
&lt;P&gt;3. make sure the dimensions and facts are public before creating the view&lt;/P&gt;
&lt;P&gt;4. create the view and query it&lt;/P&gt;
&lt;P&gt;5. try in a VA report and using code (the query might be failing).&lt;/P&gt;
&lt;P&gt;6. add more columns to the view&lt;/P&gt;
&lt;P&gt;7. add more data (yes, empty or null keys I think will create issues).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 01:00:45 GMT</pubDate>
    <dc:creator>Bogdan_Teleuca</dc:creator>
    <dc:date>2021-01-11T01:00:45Z</dc:date>
    <item>
      <title>CAS: STAR SCHEMA doesn't run</title>
      <link>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/696895#M735</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a star schema using:&lt;/P&gt;
&lt;P&gt;- &lt;STRONG&gt;fact table&lt;/STRONG&gt; -&amp;gt; media table: 4Mln rows x 48 cols&lt;/P&gt;
&lt;P&gt;- dim1 -&amp;gt; visite table: 1 Mln rows x 17 cols&lt;/P&gt;
&lt;P&gt;- dim2-&amp;gt; ana_geog: 30K rows&amp;nbsp; x 7 cols&lt;/P&gt;
&lt;P&gt;- dim3 -&amp;gt; calendario: 1 Mln rows x 13&amp;nbsp; cols&lt;/P&gt;
&lt;P&gt;- dim4 -&amp;gt; ana_utenti: 1.5 Mln rows x 7cols&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've used the procedure explained in this link&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Query-Performance-Use-a-CAS-Star-Schema-in-SAS-Viya-3-5/ta-p/622970" target="_blank" rel="noopener"&gt;Query-Performance-Use-a-CAS-Star-Schema-in-SAS-Viya-3-5&lt;/A&gt;&amp;nbsp;but I've 2 big problems:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp;The complete schema doesn't give&amp;nbsp; any output: it stars running but in the practice SAS Viya is doing nothing -&amp;gt; what can be the cause of my problem? Too many keys? Missing values? I don't know what I've to change&lt;/LI&gt;
&lt;LI&gt;When I run the code without the first join with the ana_cust table, the code run in 0.05 seconds and I obtain a star schema as output, but when I use this schema in a report it doesn't contain any rows.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I attach the code below, please&amp;nbsp; help me to understand if I do something wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc cas;
table.view / caslib='public' name='schema_media' promote = true
tables={
{caslib='datamart' name='dm_media_star',
varlist={"actions_n" "categoria" "consolidato" "content_item" "flg_entry_media" "flg_exit_media" "flg_utente_reg" "following_media" "load_timestamp" "ma_eof" "ma_init" "ma_midroll_n"
"ma_midroll_time" "ma_pausa_n" "ma_pause_time" "ma_play_n" "ma_postroll_n" "ma_postroll_time"
"ma_preroll_n" "ma_preroll_time" "ma_seek_avanti_n" "ma_seek_avanti_time" "ma_seek_indietro_n"
"ma_seek_indietro_time" "ma_seek_n" "ma_seek_time" "ma_start_content" "ma_start_content_300"
"ma_stop_content" "media_duration" "media_name" "media_order" "media_times" "media_views_300"
"media_views_play" "mute" "preceding_media" "quantity" "run_time" "second_following_media"
"second_preceding_media" "volume" "request_id"}, as='m'}
,
{keys={'m_customer_id = u_customer_id'},
caslib='datamart' name='ana_utenti',
varlist={"flg_prof_editoriale" "flg_prof_pub" "flg_utente_log" "anno_nascita" "genere" "data_reg"},
as='u'}
,
{keys={'m_key_geog = g_key_geog'},
caslib='datamart' name= 'ana_geog',
varlist = {"nazione" "citta" "continente" "regione" "zona" "provincia" },
as='g'}
,
{keys={'m_times = cal_times_dig'},
caslib = 'datamart' name= 'calendario',
varlist={"times_tv" "year_dig" "year_tv" "month_dig" "month_tv" "day_dig" "day_tv" "hour_dig"
"hour_tv" "minute" "week_dig" "week_tv"}, as='cal'}
,
{keys={'m_sid = v_sid' },
caslib = 'datamart' name = 'DM_VISITE_STAR',
varlist={"os" "browser" "organization" "resolution" "device_class" "mobile_client" "visit_duration"},
as= 'v'}
};
table.tableinfo / caslib='public' name='schema_media';

quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 14:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/696895#M735</guid>
      <dc:creator>marcoNinfa</dc:creator>
      <dc:date>2020-11-09T14:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: STAR SCHEMA doen't run</title>
      <link>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/697467#M736</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;I still think there should be a CAS community for this kind of questions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 21:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/697467#M736</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-08T21:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: STAR SCHEMA doen't run</title>
      <link>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/697622#M737</link>
      <description>&lt;P&gt;We do have a more generic SAS Viya community (under Solutions in the menu) so I've moved this topic.&amp;nbsp; Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/235111"&gt;@Bogdan_Teleuca&lt;/a&gt;&amp;nbsp;(who wrote the article) can advise.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 14:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/697622#M737</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-11-09T14:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: STAR SCHEMA doen't run</title>
      <link>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/710479#M767</link>
      <description>&lt;P&gt;The way I would eliminate the issues,&amp;nbsp;always best to use a bottom-up approach. Add complexity when the simple works.&lt;/P&gt;
&lt;P&gt;1. sample a few lines from your fact and dimensions that are supposed to join&lt;/P&gt;
&lt;P&gt;2. choose just one fact (some column types might pose issues in a view)&lt;/P&gt;
&lt;P&gt;3. make sure the dimensions and facts are public before creating the view&lt;/P&gt;
&lt;P&gt;4. create the view and query it&lt;/P&gt;
&lt;P&gt;5. try in a VA report and using code (the query might be failing).&lt;/P&gt;
&lt;P&gt;6. add more columns to the view&lt;/P&gt;
&lt;P&gt;7. add more data (yes, empty or null keys I think will create issues).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 01:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/CAS-STAR-SCHEMA-doesn-t-run/m-p/710479#M767</guid>
      <dc:creator>Bogdan_Teleuca</dc:creator>
      <dc:date>2021-01-11T01:00:45Z</dc:date>
    </item>
  </channel>
</rss>

