vegabook

vegabook

Is Explorer's ADBC module orthogonal to Ecto?

I’m in the early stages of writing a Bloomberg API wrapper for Elixir and recently asked about Ecto’s support for column DBs.

Now I discover that NX Explorer has an ADBC connectivity driver, which suits my needs really well.

However my sense was always that Ecto is the canonical database interface library for Elixir so now I’m wondering what this ADBC driver’s relationship is to Ecto. ADBC storage model is much more natural for data science, and by extension the Bloomberg API’s tendency to create huge time series. But it seems much more rudimentary for row-oriented workflows because even in a timeseries database where the data itself needs column orientation, you will also need other tables such as for ticker descriptions, or ticker groups etc, which are more row-oriented.

So my question is what is the plan on this ADBC driver. Will it be merged somehow into Ecto? Can it already be used via Ecto? Should Ecto be chucked out altogether for data science workflows?

A bit of guidance on how the developers are thinking on this would be useful. Thanks.

Marked As Solved

josevalim

josevalim

Creator of Elixir

Interesting… couldn’t Explorer joins help here? Explorer.DataFrame — Explorer v0.7.1

Also Liked

josevalim

josevalim

Creator of Elixir

Should Ecto be chucked out altogether for data science workflows?

IMO. If you can use Explorer for data science, then that would be my choice, because it was designed for this use case. Ecto was designed for business/application logic (and many operations are structured with this goal in mind).

vegabook

vegabook

So the issue is, let’s say you have a universe of 500 000 possible securities which is I believe a lower bound on what the bloomberg terminal is capable of showing. Each security has tons of metadata associated with it. Also, for say, a stock index, or a yield curve, many tickers must be joined up in “groups”. So as you can see we’re starting to have transaction-like OLTP workflows here in addition to the ticker storage columnar store.

We have:
ticker_timeseries_data - many_to_one - ticker
ticker - many_to_many - ticker_groups

We may also, when we use NX in a “live” condition (streaming inward data), have analyses that must be performed live too. So we need to keep track of those

analylsis - many_to_many - ticker
analysis - many-to_many - ticker_group

This looks a lot like “orders - customers” or “users - roles” for which Ecto is great. But it’s not great for columnar data. And the exact converse for ADBC.

So I basically have to have two database abstractions in my app. This is because unlike Python and R, which own “static” data science, the big pitch IMO for Elixir is “live” data science, with streaming data. But that’s a lot more complex situation in many cases than “static” where it’s often one-off style workflows. Live is inevitably going to have more structure to the application which is where Ecto can come in. Also, Phoenix Liveview is miles ahead of anything (except maybe ObservableHQ) in this regard.

Given the whole Elixir / BEAM stack’s way-better story on live applications than PYthon or R, I’m ensuring the bloomberg stuff I’m writing is geared that way too (in addition to “batch” history). Rblpapi for example has no concept of “live” subscription data, and in Python it’s hard.

Anyway I thought it was worthwhile elucidating my thoughts on this. I’ll for now go with Ecto + ADBC.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement