02-10-2023
hema_bhure
Calcite | Level 5
Member since
01-22-2021
- 12 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by hema_bhure
Subject Views Posted 1891 02-08-2023 11:38 AM 2174 10-05-2022 11:48 AM 2215 10-04-2022 11:27 AM 2219 10-04-2022 06:44 AM 2275 10-04-2022 04:10 AM 2342 10-03-2022 12:22 PM 949 02-26-2021 06:45 AM 1006 02-26-2021 03:44 AM 704 02-02-2021 07:51 AM 734 02-02-2021 07:14 AM -
Activity Feed for hema_bhure
- Posted I want to compare the data with previous row on SAS Programming. 02-08-2023 11:38 AM
- Posted Re: need to improve performance of query which use connection to hive on SAS Programming. 10-05-2022 11:48 AM
- Posted Re: need to improve performance of query which use connection to hive on SAS Programming. 10-04-2022 11:27 AM
- Posted Re: need to improve performance of query which use connection to hive on SAS Programming. 10-04-2022 06:44 AM
- Posted Re: need to improve performance of query which use connection to hive on SAS Programming. 10-04-2022 04:10 AM
- Posted need to improve performance of query which use connection to hive on SAS Programming. 10-03-2022 12:22 PM
- Posted Re: calculate the end_date using start date on SAS Programming. 02-26-2021 06:45 AM
- Posted calculate the end_date using start date on SAS Programming. 02-26-2021 03:44 AM
- Posted Re: How to read the country name on SAS Programming. 02-02-2021 07:51 AM
- Posted How to read the country name on SAS Programming. 02-02-2021 07:14 AM
- Posted Re: sas eg on SAS Programming. 01-25-2021 01:58 AM
- Posted Import currency symbols on SAS Programming. 01-22-2021 08:02 AM
02-08-2023
11:38 AM
Hi , Thanks in advance i need help in the following query. The data i have as follows The input dataset ----------------------------------- acc subac amt 111 1 -120.83 111 1 -120.83 111 2 -82.04 111 2 10.04 212 6 34.89 212 6 10.02 123 1 785.90 123 1 785.90 123 1 `1900.09 so I need data need to compare the current amt with previous amt on basis of account and subac and if amt is diff then raise a flag=1 The following dataset i want. ------------------------------------------ acc subac amt flag 111 1 -120.83 0 111 1 -120.83 0 111 2 -82.04 0 111 2 10.04 1 212 6 34.89 0 212 6 10.02 1 123 1 785.90 0 123 1 785.90 0 123 1 1900.09 1 please help me out.
... View more
10-05-2022
11:48 AM
thank you @SASKiwi, I will try this.
... View more
10-04-2022
11:27 AM
Thank you @LinusH , i can execute query in Hive but this source for us and we are doing etL into SAS. so i need to connection to Hadoop to access the data. thank you once again.
... View more
10-04-2022
06:44 AM
Hi, following is n_row count and log n_rows 40073670 ------------------------------------------------------------------------------------------------------------------------------------ -------------------------log----------------------------- 24 25 GOPTIONS ACCESSIBLE; 26 %let selstr = count(*) as n_rows; 27 proc sql; connect to hadoop ( server="XXXXXXXXXXXX" uri="jdbc:hive2://XXXXXX,XXXX,XXXX/; serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=XXXserver2" HIVE_KERBEROS_PRINCIPAL="hive/XXXXXX" port=xxxxx schema=xxxxx read_method=JDBC properties="mapred.job.queue.name=XXXX_default;hive.fetch.task.conversion=minimal;hive.cbo.enable=true; hive.compute.query.using.stats=true;hive.stats.fetch.column.stats=true;hive.stats.fetch.partition.stats=true; hive.prewarm.enabled=true;" dbmax_text=255 ); create table work.test as select * from connection to hadoop ( select &selstr. from &table. where to_date(process_date_time) >=&test_date_1. and to_date(process_date_time) <=&test_date_2. ); disconnect from hadoop; quit; NOTE: Compression was disabled for data set WORK.TEST because compression overhead would increase the size of the data set. NOTE: Table WORK.TEST created, with 1 rows and 1 columns. 51 ; 2 The SAS System 09:56 Tuesday, October 4, 2022 52 disconnect from hadoop; 53 quit; NOTE: PROCEDURE SQL used (Total process time): real time 17:21.22 user cpu time 0.12 seconds system cpu time 0.08 seconds memory 5598.90k OS Memory 43688.00k Timestamp 04/10/2022 11:18:42 AM Step Count 9 Switch Count 3 Page Faults 0 Page Reclaims 312 Page Swaps 0 Voluntary Context Switches 5065 Involuntary Context Switches 50 Block Input Operations 0 Block Output Operations 0 54 55 GOPTIONS NOACCESSIBLE; 56 %LET _CLIENTTASKLABEL=; 57 %LET _CLIENTPROCESSFLOWNAME=; 58 %LET _CLIENTPROJECTPATH=; 59 %LET _CLIENTPROJECTPATHHOST=; 60 %LET _CLIENTPROJECTNAME=; 61 %LET _SASPROGRAMFILE=; 62 %LET _SASPROGRAMFILEHOST=; 63 64 ;*';*";*/;quit;run; 65 ODS _ALL_ CLOSE; 66 67 68 QUIT; RUN; 69
... View more
10-04-2022
04:10 AM
Hi, no there is not changing the variable into the &selstr. The selstr is limited for this query only. I am just copying the the processing time and number of observation below. please let me know how i can optimised it, i tried libname approach also but the still query takes lot of time to extract data. ---------------------------------------------------------------------------------------------------------------------------- NOTE: Compressing data set WORK.test decreased size by 0.71 percent. Compressed is 58707 pages; un-compressed would require 59127 pages. NOTE: Table WORK.test created, with 43930975 rows and 13 columns. 45 ; 46 disconnect from hadoop; 47 quit; NOTE: PROCEDURE SQL used (Total process time): real time 35:37.20 2 The SAS System 09:28 Thursday, September 29, 2022 user cpu time 1:19.61 system cpu time 26.64 seconds memory 5633.62k OS Memory 43176.00k Timestamp 29/09/2022 03:46:38 PM Step Count 8 Switch Count 3 Page Faults 68 Page Reclaims 440 Page Swaps 0 Voluntary Context Switches 92058 Involuntary Context Switches 26290 Block Input Operations 0 Block Output Operations 0
... View more
10-03-2022
12:22 PM
Hi All, I am using SAS EG 7.1 and writing some query such as parsethrough which use using to connect to the hive and accessing data from Hadoop but its taking to much time to execute simple queries and i need to improve the performance of query , so could you please help me to improve performance . %let selstr = int(test_acc/100) as pac, test_acc-100 * int(test_acc/100) as test_sub_acc, date-&dt_1. as comp_dt, lstcapdte-&dt_2. as lstcap_dt, test_int_rate/100 as int_rate, Test_cur_bal as Bal, edh_ingest_ts; proc sql; connect to hadoop ( server="XXXXXXXXXXXX" uri="jdbc:hive2://XXXXXX,XXXX,XXXX/; serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=XXXserver2" HIVE_KERBEROS_PRINCIPAL="hive/XXXXXX" port=xxxxx schema=xxxxx read_method=JDBC properties="mapred.job.queue.name=XXXX_default;hive.fetch.task.conversion=minimal;hive.cbo.enable=true; hive.compute.query.using.stats=true;hive.stats.fetch.column.stats=true;hive.stats.fetch.partition.stats=true; hive.prewarm.enabled=true;" dbmax_text=255 ); create table work.test as select * from connection to hadoop ( select &selstr. from &table. where to_date(process_date_time) >=&test_date_1. and to_date(process_date_time) <=&test_date_2. ); disconnect from hadoop; quit; /*processing time as below*/ NOTE: PROCEDURE SQL used (Total process time): real time 35:37.20 2 The SAS System 09:28 Thursday, September 29, 2022 user cpu time 1:19.61 system cpu time 26.64 seconds memory 5633.62k OS Memory 43176.00k Timestamp 29/09/2022 03:46:38 PM Step Count 8 Switch Count 3 Page Faults 68 Page Reclaims 440 Page Swaps 0 Voluntary Context Switches 92058 Involuntary Context Switches 26290 Block Input Operations 0 Block Output Operations 0
... View more
02-26-2021
06:45 AM
hank you Shumuel, but i need to calculate other date apart from 9999-99-99. I have tried lag function but not getting proper output
... View more
02-26-2021
03:44 AM
Hi, Thanks In advance I need to calculate the end_date using start date. The date columns is in date format. I want to calculate the end_date on basis of id and term_month_begin and term_month_end. Pease help me to get data correctly input dataset ------------------------ id Term_month_begin Term_Month_end Start_dt 1 6 6 2011-01-04 1 12 12 2011-01-04 2 3 3 2011-01-04 2 3 3 2016-02-04 2 6 6 2017-02-03 2 6 6 2018-02-01 output I want ------------------ id Term_month_begin Term_Month_end Start_dt end_dt 1 6 6 2011-01-04 9999-99-99 1 12 12 2011-01-04 9999-99-99 2 3 3 2011-01-04 2016-02-03 2 3 3 2016-02-04 9999-99-99 2 6 6 2017-02-03 2017-12-31 2 6 6 2018-02-01 9999-99-99
... View more
02-02-2021
07:14 AM
Hi All, Thanks in advance. I want to read the country name using following code, but unable to read the third and forth record properly observation properly it just read the CZECH RE not a full name of country, Please help me to read the observation correctly. data country; input country $ code $; datalines; Astria EUR BELGIUM EUR CZECH_REPUBLIC EUR united Kingdom GBP ; run; please help me to read the data properly using datalines.
... View more
01-25-2021
01:58 AM
Thank You so much for your time, I have tried through an SAS EG using import data option. and the following code has been generated. and I need same output data n SAS data set. Input data ---------------- CountryISOCode_2 CountryISOCode_3 CountryName CurrencyCode Region CurrencySymbol AT AUT AUSTRIA EUR ACC € BE BEL BELGIUM EUR ACC € CZ CZE CZECH REPUBLIC CZK ACC Kč DE DEU GERMANY EUR ACC € ES ESP SPAIN EUR ACC € NL NLD HOLLAND NLG ACC ƒ code generated through the the IMPORT DATA option in EG ------------------------------------------------------------------------------------------- DATA WORK.'Copy of EU_Company'n; 30 LENGTH 31 CountryISOCode_2 $ 2 32 CountryISOCode_3 $ 3 33 CountryName $ 14 34 CurrencyCode $ 3 35 Region $ 4 36 CurrencySymbol $ 2 ; 37 FORMAT 38 CountryISOCode_2 $CHAR2. 39 CountryISOCode_3 $CHAR3. 40 CountryName $CHAR14. 41 CurrencyCode $CHAR3. 42 Region $CHAR4. 43 CurrencySymbol $CHAR2. ; 44 INFORMAT 45 CountryISOCode_2 $CHAR2. 46 CountryISOCode_3 $CHAR3. 47 CountryName $CHAR14. 48 CurrencyCode $CHAR3. 49 Region $CHAR4. 50 CurrencySymbol $CHAR2. ; 51 INFILE '/sas/files/excel/#LN00018' 52 LRECL=33 53 ENCODING="LATIN1" 54 TERMSTR=CRLF 55 DLM='7F'x 56 MISSOVER 57 DSD ; 58 INPUT 2 The SAS System 01:24 Monday, January 25, 2021 59 CountryISOCode_2 : $CHAR2. 60 CountryISOCode_3 : $CHAR3. 61 CountryName : $CHAR14. 62 CurrencyCode : $CHAR3. 63 Region : $CHAR4. 64 CurrencySymbol : $CHAR2. ; 65 RUN;
... View more
01-22-2021
08:02 AM
Thanks In advance,
I have currencycode.csv file and i want to import into SAS using code but unable to import it.
currencycode.csv ------------------------- ------------------------------------------------ country code currencysymbol ------------------------------------------------ Australia AUT $ Austria AST € canada CAD $ Belgium BEL €
I want to rea this special character in column currencysymbol in sas as it, could you please help me to read this csv file.
... View more