04-14-2015 12:33 AM
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 html/body/table
My query is how do I tell SAS the location from which it should import.
Request if some one can help on this.
|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|
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||18.104.22.168.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||22.214.171.124.0||59.60||0.16||1,449.04||0.00||Linux x86 64-bit|
|Memory Target||Sga Target||DB Cache||Shared Pool||Large Pool||Java Pool||Streams Pool||PGA Target|
04-14-2015 12:40 AM
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.
04-14-2015 01:05 AM
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.
04-14-2015 01:55 AM
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.
04-14-2015 12:17 PM
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.
04-14-2015 02:50 AM
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.