BookmarkSubscribeRSS Feed
acordes
Rhodochrosite | Level 12

I have to read 6000 rows from an aggregated table whose value pairs are unique and filter another table in a fedsql join.

It works but I have to cut its execution into pieces by using firstobs and obs statement. 

From trial and error 500 observations still work fine but reading more rows makes the browser crush.

I think it has to do with the amount of notes that are generated (up to 10000 after reading 500 rows), it seems to me that they overflow the available memory. but they're only note...

I'm confused. 

 

a1.png

here is some extract from the log. 

 

 

 

proc cas;
source MPG_toyota; 
create table public.progress{options replace=true} as select '52290' as fk_clave_com, '2_101' as 
uniqueID, 3 as frek_campaign, 'Q2' as  from_gama_agg,
22572 as start_date, 22635 as end_date , count(*) from 
PUBLIC.FACT_DIARIO_MARCAS2 where from_gama_agg= 'Q2' and 22572 <= _sales_date and _sales_date <= 22635 ; 
endsource;fedSQL.execDirect / query=MPG_toyota;
quit;

data public.progress;
set public.progress(obs=0);
run;


data _null_;
set public.dist(keep=from_gama_agg st fin _fk_clave_com_f n_total uniqueID firstobs=1 obs=500);
call execute (catx(' ', 'proc cas;
source MPG_toyota; 
create table public.temp{options replace=true} as select ', 
quote(strip(_fk_clave_com_f), "'"),'as fk_clave_com,',
put(quote(strip(uniqueID), "'"), $17.),'as uniqueID,',
n_total,'as frek_campaign,', 
quote(strip(from_gama_agg), "'"),'as from_gama_agg,',
st,' as start_date,',
fin,' as end_date,
count(*) from  
PUBLIC.FACT_DIARIO_MARCAS2 where from_gama_agg=', quote(strip(from_gama_agg), "'"), 'and ', st,  
'<= _sales_date and _sales_date <= ', fin, '; 
endsource;
fedSQL.execDirect / query=MPG_toyota;
quit;
data public.progress;
set public.progress  public.temp  ;
run;'
));
run;

 

2 REPLIES 2
JOL
SAS Employee JOL
SAS Employee

@acordes 

 

Try adjusting the  DMSLOGSIZE option.  The default is  DMSLOGSIZE=99999.

OPTIONS   DMSLOGSIZE=      ;

SASKiwi
PROC Star

What SAS user interface are you using? I assume it is SAS Studio but what version? What version of Viya are you using? What does "your tab just crashed" mean? I don't see any errors in your screenshot. Do you see any errors when the browser crashes? What browser and version are you using. Does another browser cause the same problem?

 

Using - options nonotes; - might help but I'm not entirely convinced that is the problem.  

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 226 views
  • 1 like
  • 3 in conversation