12-30-2024
Steelers_In_DC
Barite | Level 11
Member since
07-19-2012
- 891 Posts
- 36 Likes Given
- 19 Solutions
- 213 Likes Received
About
I have worked on a research team, as a data/risk analyst, also as a Marketing Analytics Manager, as a consultant and now in the healthcare industry.
-
Latest posts by Steelers_In_DC
Subject Views Posted 705 12-30-2024 10:17 AM 1082 12-14-2023 01:34 PM 1121 12-14-2023 12:53 PM 2216 09-29-2023 11:00 AM 594 03-10-2022 10:48 AM 2649 10-21-2021 05:00 PM 2664 10-21-2021 03:55 PM 2702 10-21-2021 02:03 PM 2753 10-21-2021 01:31 PM 1215 10-15-2021 10:06 AM -
Activity Feed for Steelers_In_DC
- Posted sql server using 'with' on SAS Programming. 12-30-2024 10:17 AM
- Posted Re: hive show table and column on SAS Programming. 12-14-2023 01:34 PM
- Posted hive show table and column on SAS Programming. 12-14-2023 12:53 PM
- Liked Re: proc sql using or for Tom. 09-29-2023 12:05 PM
- Posted proc sql using or on SAS Procedures. 09-29-2023 11:00 AM
- Got a Like for find edge node. 03-10-2022 10:53 AM
- Posted find edge node on SAS Programming. 03-10-2022 10:48 AM
- Posted Re: Fill in rows with previous value if next value is the same. on SAS Programming. 10-21-2021 05:00 PM
- Posted Re: Fill in rows with previous value if next value is the same. on SAS Programming. 10-21-2021 03:55 PM
- Posted Re: Fill in rows with previous value if next value is the same. on SAS Programming. 10-21-2021 02:03 PM
- Posted Fill in rows with previous value if next value is the same. on SAS Programming. 10-21-2021 01:31 PM
- Posted Re: reg ex extract on SAS Programming. 10-15-2021 10:06 AM
- Posted reg ex extract on SAS Programming. 10-15-2021 09:52 AM
- Posted Re: proc transpose wide to tall, numbers lose formatting on SAS Procedures. 12-18-2020 04:31 PM
- Posted proc transpose wide to tall, numbers lose formatting on SAS Procedures. 12-18-2020 04:17 PM
- Posted duplicated columns on SAS Programming. 05-06-2020 11:46 AM
- Posted Re: Hive Statements with PROC SQL on SAS Programming. 04-23-2020 02:57 PM
- Posted Re: find EG IP address using PC SAS on SAS Enterprise Guide. 01-10-2020 01:28 PM
- Posted Re: find EG IP address using PC SAS on SAS Enterprise Guide. 01-10-2020 01:19 PM
- Posted Re: find EG IP address using PC SAS on SAS Enterprise Guide. 01-10-2020 12:48 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 3 1 1 4 -
My Liked Posts
Subject Likes Posted 1 03-10-2022 10:48 AM 1 10-25-2012 09:17 AM 1 07-30-2015 08:29 AM 1 06-03-2015 07:32 AM 1 04-08-2015 02:53 PM
12-30-2024
10:17 AM
I am using a pass through connection to sql server. I am attempting to translate from a pass through connection to hadoop. Can anyone look a the code below and see if this looks correct. The normal way I use the pass through to sql server isn't working due to an extra open parenthesis, but when I remove it I still get an error. The open parens prior to select distinct, as well as the open parens in front of WITH are the issue. If I add another close parens at the end it errors.
proc sql; connect to sqlsvr (dsn=chsrproddb &_log_host); CREATE TABLE FullData AS SELECT * FROM CONNECTION TO sqlsvr (select distinct (WITH this_srvc_auth AS ( SELECT
... View more
12-14-2023
01:34 PM
this is not ODBC:
proc sql;
connect to hadoop
(READ_METHOD=HDFS /* this attemps HDFS read which is faster than JDBC */
server='' /* the hiveserver we talk to */
LOGIN_TIMEOUT=300
schema=&schema. /* this is the schema where you want to read or write data to */
uri=
... View more
12-14-2023
12:53 PM
I found the below solution in our community but would like to adapt it to include columns:
this is passing through to hadoop:
select * from connection to hadoop (show tables);
Is there a modification that can show tables and columns?
... View more
09-29-2023
11:00 AM
I have some legacy code that takes a very long time to run, on join is > 8 hours. When I break it down it has many or and multiple filters:
proc sql;
create table have as
select a.*,b.*
from table 1 a,
table 2 b
where a.id = b.id
and blah
or where a.id = b.id
and blah blah blah
I've broken this apart into 6 different queries. I concatenate at the end in a dataset and it runs so much faster I'm shocked. From hours to minutes. I can't find much on using or like this other than it's not efficient. Is there any rules/laws/best practices/documentation somewhere that details this?
I'd like to have more than my test to take back to the original developers to get them to change their ways. Thank You in advance
... View more
03-10-2022
10:48 AM
1 Like
Hello all, I have very little tech/admin support in my current role. I am trying to find the name of the edge node I am connected to so I can connect elsewhere(putty,crt,jupyter). Is there a way within SAS to see the edgenode? I find some documentation about %macro allPaths() but it hasn't been helpful.
Thank You in advance.
... View more
10-21-2021
05:00 PM
I see the issue, case is before the set statement so it's a number. I added format case $500.; after the data step and this works. thanks for the help.
... View more
10-21-2021
03:55 PM
this looks great, can up modify this for case as a character?
... View more
10-21-2021
02:03 PM
There is also an ID field,
I can use:
data want;
set have;
by id;
retain _case;
if not missing(case_id) then _case = case_id;
run;
that gets me part of the way, but it fills in the last rows when the next value will not be the same. I suppose I could sort the other way and delete some.
... View more
10-21-2021
01:31 PM
I have a file with a case number that is sporadically filled in. The file is 500k plus rows, If the next time a case # is filled in happens to be the same case # as before I want to fill in the blanks. I thought of using lag() but some of the missing rows are pretty large. If the next case # populated is different the rows between should be left blank.
data have; infile cards dsd; input case$ ; cards; 500 , , , 500 , 600 , , 700 700 , 700 ; run;
data want; infile cards dsd; input case$ ; cards; 500 500 500 500 500 , 600 , , 700 700 700 700 ; run;
... View more
10-15-2021
10:06 AM
I'm always open to suggestions but in case this can help anyone else I'm going to put my solution below:
/*identifies word case in string*/
data p_case; set check_case(obs=10 keep=Event_Log_Derived_Details); if _N_ > 0 then do; p_case = prxparse("/Case/"); end; find_case = prxmatch(p_case,Event_Log_Derived_Details); run;
/*uses place of 'Case' in string to get substring with '/' as the delimiter to extract the desired ID 'case' number*/
data find_case; set p_case; case = scan(substr(Event_Log_Derived_Details,find_case),2,'/'); run;
... View more
10-15-2021
09:52 AM
I have a long alpha numeric string with front slash delimiters throughout. Within the string are specific 'case' id numbers. I am trying to get everything in the string after the word 'Case', after that I can use the delimiter to drop everything after that. I'm so out of practice with regex that I haven't been able to get there searching.
any help is appreciated.
... View more
12-18-2020
04:31 PM
Spot on, I didn't realize I missed one of the (pre transpose) columns in formatting. Once I fixed that it's perfect, and the formatting held through the proc report.
Have a great weekend, Happy Holidays, stay healthy.
... View more
12-18-2020
04:17 PM
I have a simple transpose from wide with 11 columns to tall with 3 columns. When the data is wide the numbers are formatted to show commas, when tall they lose the formatting. Is there anyway in the proc to format the columns?
I'm following up with a proc report, so if I can format there I'll be happy to do it there.
... View more
05-06-2020
11:46 AM
I have a dataset that appears to have two duplicate columns. One is named _col15, the other is _col18, they both match other columns that I have pulled in from a larger dataset.
I've never seen this before, and don't see anything in the code that would generate this. Prior to this dataset there are several simple left joins, nothing else. Any thoughts?
Edit: apologies, I found in the original query that two columns were entered twice, the forum wouldn't let me delete the post.
... View more
04-23-2020
02:57 PM
I'm not sure where in the query process these commands go, would this be after the :
PROC SQL; CONNECT TO odbc();
(enter here)
and before the:
CREATE TABLE table AS
... View more