-
Notifications
You must be signed in to change notification settings - Fork 936
[draft] feat: improve performance of mapping #4166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4166 +/- ##
==========================================
- Coverage 30.95% 30.59% -0.36%
==========================================
Files 92 93 +1
Lines 10257 10613 +356
==========================================
+ Hits 3175 3247 +72
- Misses 7082 7366 +284 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@skynetigor i'm not sure if cel_to_sql is the right place to put it, but it kinda reminded me with what you're doing with formatting the query to work on the DB. That's why I put it over there. |
@talboren crazy question - don't we want to convert CSV with table on upload, but not on runtime? |
@talboren Great idea about utilizing DB for this 👍 |
71d4156
to
d533568
Compare
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
Still working on it! Will try to finalize next week. |
e61a93e
to
566853c
Compare
close #4165
Improves the performance of mapping by moving the logic to the DB side.
Since
rows
is just a simple "table" (e.g., a CSV file), we can flatten the JSON column with DB functions (i.e., JSON_TABLE, orin the case of SQLite, and run the respective query in the DB.
In cases where we have a lot of rows (>50K), it's much more performant then loading everything in memory on every event..
TBD:
Useful: https://docs.sqlalchemy.org/en/14/orm/loading_columns.html#deferred-column-loading