Hi,
I'm working on a project that needs to import data from 2 websites to MS Access on a daily basis. The data sets are exported from Access to excel and then merged into 4 datasets. The files also will be exported from Excel to SAS, cleaned, deduplicated, matched, and merged into one data set then exported back to excel.
My question - Is there any code that I can use to automate data import to SAS/ export to excel and/or any part of the data manipulation.
Thank you
If you can operationalize your data cleansing process then using SAS will allow for much better control and auditability than using MS Access or even worse MS Excel.
Accessing data from the Internet using SAS is possible. If and how exactly this needs to work technically "depends". If this is a public URL then I'd suggest you ask a separate question, provide the URL and show exactly what data you want to pull into SAS.
Data cleansing using SAS is "standard".
Creating Excel files using SAS is "standard".
Using SAS will allow you to "automate" the process as long as you're able to pre-define the cleansing rules.
I believe with SAS Viya/VA there are also some interactive ways for data cleansing - but given what you shared that's not the environment you're operating in.
From MS Access to MS Excel to SAS and then back to Excel? Feels like a very convoluted process. Excel is not a very good data source because it doesn't provide "stable" column definitions.
My "gut feel" is: This design requires re-assessment.
Questions
1. Is SAS running on the same platform (computer) than Access or Excel?
2. Do you have SAS Access to PC Files licensed
3. IF SAS runs on the same platform than Access: Would it be an option for SAS to directly read from MS Access? Or would it even be an option for SAS to pull the information directly from the website?
You will need to provide more information how your environment looks like for us to really provide guidance.
Hi Patrick,
Thank you Patrick for the quick response. Here are my answers to your questions.
Is SAS running on the same platform (computer) than Access or Excel? Yes, it is running on the same computer.
2. Do you have SAS Access to PC Files licensed. Yes, I have SAS Access to PC files licensed
3. IF SAS runs on the same platform than Access: Would it be an option for SAS to directly read from MS Access? Or would it even be an option for SAS to pull the information directly from the website?
For this, I would definitely prefer the process in the following order:
Thank you
You use three tools where one should suffice. Do everything in SAS.
Are the websites public?
Hi Kurt,
The websites are not public. I have no clue if it's possible to pull the data from the websites to SAS.
Thank you
So the "pull" is a mostly manual process, and you get a .accdb file from the first, and could get a .sas7bdat from the second?
Hi Kurt,
Yes, that's what I think is the case. So most probably the automation should be done after this step, if possible.
Thank you
With SAS/ACCESS to PC Files, you can read the .accdb file directly, and a .sas7bdat file can immediately be used, so there's no need to involve Excel at all.
So, can the import from Access to SAS be automated? That is when new data are added to Access, it will be reflected automatically in SAS. The other issue is that I do a lot of data manipulation in excel, and by skipping this, I have to do all the work in SAS. Is there a way to automate this step (data cleaning, deduplicating, and merging) in SAS?
Thank you
If you can operationalize your data cleansing process then using SAS will allow for much better control and auditability than using MS Access or even worse MS Excel.
Accessing data from the Internet using SAS is possible. If and how exactly this needs to work technically "depends". If this is a public URL then I'd suggest you ask a separate question, provide the URL and show exactly what data you want to pull into SAS.
Data cleansing using SAS is "standard".
Creating Excel files using SAS is "standard".
Using SAS will allow you to "automate" the process as long as you're able to pre-define the cleansing rules.
I believe with SAS Viya/VA there are also some interactive ways for data cleansing - but given what you shared that's not the environment you're operating in.
Any SAS code can be automated. What you need is a reliable trigger that tells the scheduling mechanism that new data is available on the website.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.