bigfish1

bigfish1

Best way to handle ETL tasks in Elixir?

I am looking for suggestions on the best way to handle ETL tasks in elixir or if I should just do these tasks in SQL + dbt + airflow.

I’m building an application around forecasting the effects of training on athletes to be used by team athletic staff. The users will upload data from wearable devices and we extract what we need then have two stages of transformation before writing the DB and the user can see these graphed on a nice dashboard.

I currently have these transformations written in SQL and can orchestrate them with dbt, but I would like to simplify this.

Would gen stage be a good fit here or should I avoid putting this pipeline into the application and keep it separate. Ideally I would like to move away from SQL and do this all with Nx Explorer because the cost of containers running is a lot cheaper then managed databases.

If anyone has any experience or advice here it would be greatly appreciated. Thank you in advance

Marked As Solved

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

GenStage / Broadway and other libraries in that family are a good fit when you have a sort of continuous stream of data to operate on. If when you say “users will upload data” you mean that data is being continuously streamed to you then GenStage could be a good fit to at least get the data written, and then run queries to do further transformations.

However if by “users will upload data” you mean it’s more of a bulk / batch operation then I’d consider something like Oban to do this in a “job” structure. A file gets uploaded and you kick off a job to go ingest data from the file, and run further queries to transform that data. It depends a bit on how data comes to you.

Also Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Gotcha. I mean doing this in memory isn’t impossible by any stretch, but it may be cheaper to use something like clickhouse that is optimized for these sorts of bulk queries / transformations. We’ve been testing it lately for internal reporting and IoT data management and it is crazy fast, while still giving you a lot of the flexibility you’d expect from a SQL interface.

EDIT: @dimitarvp I mean explorer is rust if you’re using the polars backend. The issue is the same either way: If in memory is fine, do rust / polars / explorer / whatever but if not, an OLAP database is probably the next best bet.

bigfish1

bigfish1

Thanks, this will be more of batch data. When players do an activity the wearable device records this as a file. After completion these get uploaded manually or pushed to a webhook. Thanks for all your help!

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
New
Kurisu
For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2, I would like to get: ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
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
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement