OLEDB connection in R - r

Does anyone know of any way to connect to an OLEDB data source directly in R?
I've tried google, CRAN and rseek with no luck whatsoever.

A good alternative to both ODBC and OLEDB for saving data to SQL Server is to BCP using the rsqlserver package that is on GitHub here: https://github.com/agstudy/rsqlserver
You can pull down data via ODBC if you'd like which would be pretty fast, but sending data to SQL Server via ODBC will take a long time (in my tests), so BCP is a great option.
It's a little difficult to install (requires .NET and rtools), but once you get it going it's blazing fast.

Depending on versions and drivers, this may work:
http://cran.r-project.org/web/packages/RODBC/index.html

Related

Alternative to odbc package for Oracle R

I was wondering how people generally connected to Oracle Databases in R. Currently I am using the odbc package and I was wondering if there was a faster alternative. I looked at ROracle, but it seems to involve downloading and using an older version of R (I am currently using R 4.0). Are odbc and ROracle the only options?
I believe odbc and ROracle are the two best packages for connecting to an Oracle database. Both are based on DBI and require the Oracle instant client to be installed on the system.
odbc is available as a binary on CRAN. As ROracle requires the Oracle instant client to build the package, the binary must be downloaded from Oracle or installed from source, which can be tricky. With both packages, I have experienced difficulties in initial setup.
As far as the user interface is concerned, ROracle and odbc are very similar but there are subtle differences. For example, ROracle does not have a dbBind function, instead passing a data.frame with bind data to dbSendQuery. There may also be minor differences when using dbplyr.
In the olden days, people used the RODBC and JDBC packages. These are still being maintained. In my experience though, these are considerably slower than ROracle or odbc. I would consider them to be legacy packages that should not be considered for new projects.

How do I extract non-HANA ECC tables into R?

I find that there's very little documentation on how to extract SAP tables into R.
I'm not talking about SAP HANA.
Currently, it's very troublesome that I need to manually extract SAP tables using a GUI interface, export them into tabular format. Then only I can import them using my R script.
The current solution I'm exploring is to have my SAP colleagues to export those SAP tables into SQL database, then I can query the tables from R.
Ideally I want to cut this seemingly unnecessary step of having the SAP tables exported into a database.
For SAP R/3 systems (or what you call ECC), your best bet would be executing remote function calls (i.e. RFC).
Normally these would be supported by open source interfaces for at least the more recent versions (e.g. 4.6 or above).
However, they are fairly scarce and I know only of one such implementation in R - this is the RSAP. You'd also need to download NW RFC SDK, and there may be further requirements based on your OS (e.g. what Visual C++ you'd need for Windows, etc.).
There's also a slightly more widely recognised equivalent in Python, the PyRFC.
On the other hand, you may try Robotic Process Automation (RPA) to interact with GUI in an automated way. One of the options is UiPath but there are others. This way you could configure the automation of table extraction - at the same time you can also call R scripts directly from the RPA.
Overall - to be honest - the solution with extracting tables into a separate database does seem to be the best alternative (compared to what I've described above).
Note: The above presumes that - for any reason, usually security - you cannot access the database underlying ECC directly through ODBC calls - otherwise the instructions for connecting and calling SQL from R are the same as for HANA or similar.
Consider using RODBC. This package allows adding different ODBC sources and use them in R Studio.
Follow this article and don't bug to word "HANA", this approach allows using any database, not only HANA.

Connecting to a SSAS cube using R

Is it possible to query a SQL Server Analysis Services cube using R?
I have this cube on a different external Server and i am working from my machine but i have admin privileges on the Server with my domain account.
To put it simply, i want to create an alaysis services solution, suing some mining algorithm to examine data cotained in the Cube. I can do that with Excel, for instance, but i need to use R to take advantage of several interesting clustering algorithms different from those MS offers.
Is that possible? Which package should i import in R?
maybe something is coming from here
https://www.linkedin.com/groups/Importing-MDX-OLAP-cube-data-77616%2ES%2E265568694?view=&gid=77616&item=265568694&type=member&commentID=discussion%3A265568694%3Agroup%3A77616&trk=hb_ntf_COMMENTED_ON_GROUP_DISCUSSION_YOU_COMMENTED_ON&_mSplash=1
at the moment it's not available from CRAN, but maybe you will give it a try.
In the meantime you can also use an ODBC / OLEDB bridge and use the RODBC from inside R.
Hope this helps a little
Tom

SQLite3 GUI front-end (FileMaker)?

Is there any program that can serve as a GUI front end for SQLite3 database?
The general idea is to connect to the database remotely, and administer it in FileMaker-like GUI interface, where the online scripts would have a job of just presenting stuff.
I tried FileMaker with ODBC drivers, but have not been successful. SQLite3 is not directly supported, and I couldn't find another driver or software online. (Please mind that I am not talking about database editor software, but something that would be used as a database "CMS" if you will.)
Thanks!
Are you using a mac? Try the ODBC from Actual Technologies that will work for the most databases out there.
There is a more direct approach, that I like better because ODBC is not fast. For small amounts of data it's ok. Besides that communicating direct with the external database without to much middleware is in my opinion always better.
MBS has a very nice plugin, and supports a lot of SQL connections. It works really well and fast. Perhaps you should take a look. I use it a lot, as I've used ODBC a lot in the past.

connecting to salesforce using SAS

I have a client with salesforce enterprise edition. I need to connect to and extract the salesforce data using Base SAS (SAS/Access for ODBC is licensed).
How can this be achieved? Is it possible to map a libname using an ODBC engine, or is it necessary to use the web APIs?
Don't know about Salesforce support for ODBC, but certainly it is possible to map a libname using ODBC.
http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_91/access_odbc_7365.pdf
has examples - basically it is
libname <name> odbc <connection options>;
Salesforce specific SAS product:
http://support.sas.com/documentation/cdl/en/bidsag/61236/HTML/default/viewer.htm#a003279102.htm
That requires more than base SAS, of course, but if SAS BI is an option it seems pretty easy to configure.
Another option that is not free (well, it seems to be free for 15 days):
http://blogs.datadirect.com/2012/02/sas-access-to-salesforce-crm-for-superior-odbc-integration-with-sas.html
It doesn't seem like there is a free ODBC driver for Salesforce, though, unless something's changed - example, http://success.salesforce.com/ideaView?id=08730000000Bqqu seems to suggest it's something desired but not available.
So for free solution you may want to use the Web API...

Resources