Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Bloomberg API through Python or R

underkj
6 - Meteoroid

Has anyone had any lucky connecting to a Bloomberg Terminal with either the R or Python tool? My org. does not allow for the utilization of some tools such as the download tool to make a connector. I also think that it would be more tedious even trying to build such a thing. But I am proficient in R and have read documentation for the API connection to the terminal using the package Rblpapi seen here.

 

My code:

 

r = getOption("repos")
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
install.packages("Rblpapi")

 

It should just be as simple as downloading the package into Alteryx, but when running the workflow I have a multitude of errors. 

I'm wondering if it's not working for the same reason my org does not allow for the utilization of other tools or if it is because the base R is just not compatible with the package? If anyone has any experience connecting to Bloomberg via Python that would be extremely useful. I've read the documentation on how to install it via pip but didn't know if that was doable through Alteryx. 

 

My end goal is to just run the workflow, have the R/Python script execute the bloomberg api functions so I can use the data later in my Alteryx workfow

 

Cheers

5 REPLIES 5
apathetichell
18 - Pollux

I'm running R 4.04 with 2021.2 and I've usually had success installing packages with the repos included in the install.packages() line...  I was trying to install CallJulia a few days ago which may have crashed my Alteryx R install so it's not working for me right now - but hypothetically that usually works.

underkj
6 - Meteoroid

I started with install.packages() by itself but as I'm sure you know how it goes, one error led me to a SO page that described the above code would work. When I run that above at least it doesn't bring up any errors- only warnings, not that it amounts to much since it's not doing what I want. 

apathetichell
18 - Pollux

FYI - this worked for me:

install.packages("Rblpapi",repos="https://cran.r-project.org")
library(Rblpapi)

apathetichell
18 - Pollux

I would upgrade to 4.04 via 2021.2 if you are having problems. I removed and reinstalled R to get this to work because post Julia it wasn't letting me install anything.

underkj
6 - Meteoroid

Thank you. It has to do with my org then, otherwise I'd be able to download such a thing. I appreciate this a lot

 

Labels