D/All,
I have a HTML report which has plenty of tables of different data structures reported. For some analysis i need to import this entire HTML file and create different sas datasets for each table output.
Using XPATH i can get the the path for each table ex: html/body/table[1] html/body/table[2]
My query is how do I tell SAS the location from which it should import.
Request if some one can help on this.
Thanks.
Database Summary
Database | Snapshot Ids | Number of Instances | Number of Hosts | Report Total (minutes) | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Id | Name | RAC | Block Size | Begin | End | In Report | Total | In Report | Total | DB time | Elapsed time |
2836634542 | INST1 | YES | 8192 | 4743 | 4744 | 2 | 2 | 2 | 2 | 0.43 | 60.27 |
Database Instances Included In Report
I# | Instance | Host | Startup | Begin Snap Time | End Snap Time | Release | Elapsed Time(min) | DB time(min) | Up Time(hrs) | Avg Active Sessions | Platform |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | INST1 | hostname1 | 02-Dec-14 14:09 | 22-Jan-15 16:00 | 22-Jan-15 16:59 | 11.2.0.2.0 | 59.60 | 0.28 | 1,226.83 | 0.00 | Linux x86 64-bit |
2 | INST2 | hostname2 | 23-Nov-14 07:57 | 22-Jan-15 16:00 | 22-Jan-15 17:00 | 11.2.0.2.0 | 59.60 | 0.16 | 1,449.04 | 0.00 | Linux x86 64-bit |
Cache Sizes
Memory Target | Sga Target | DB Cache | Shared Pool | Large Pool | Java Pool | Streams Pool | PGA Target | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
I# | Begin | End | Begin | End | Begin | End | Begin | End | Begin | End | Begin | End | Begin | End | Begin | End | Log Buffer |
1 | 2,000 | 1,312 | 480 | 768 | 16 | 16 | 688 | 20.20 | |||||||||
2 | 2,000 | 1,312 | 480 | 768 | 16 | 16 | 688 | 20.20 | |||||||||
Avg | 2,000 | 1,312 | 480 | 768 | 16 | 16 | 688 | 20.20 | |||||||||
Min | 2,000 | 1,312 | 480 | 768 | 16 | 16 | 688 | 20.20 | |||||||||
Max | 2,000 | 1,312 | 480 | 768 | 16 | 16 | 688 | 20.20 |
Is this a one time occurrence or do you need to update it frequently?
Actually...I would still recommend import.io the downloaded application instead. The API will generate a decently formed table for the majority of cases.
There are heaps of reports generated. Unfortunately the logic used to generate these reports is now known but need to use the ouput data for further analysis.
This can be concurrent hence need to script it for automation. For now I'm manually doing copy paste which is taking lot of time.
Sounds dangerous to base analysis on some reports created by an unknown logic....
Infact it is but have no other option to me...
I found one nice article ( http://support.sas.com/resources/papers/proceedings09/052-2009.pdf ) but few components are missing in this code and I'm not able to understand what exactly is missing.
Scraping data from websites and documents is a common task these days.
Given what you've provided its hard to comment further. As much as I love SAS its not what I use to scrape data. Depending on the size/task Import.IO works or save as PDF amd use Adobe pro to convert to Excel. Or Nitro which is free.
Anyways, post a sample of your file or preferably the link if you need more help.
These all look like stats from a RDBMS. The stats modules of RDBMS's can also write textual data files, which are much easier to read from SAS than HTML. Get those text files from the DBA people and work from that.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.