-
Notifications
You must be signed in to change notification settings - Fork 4
Add import_csv_pandas and import_csv_dask utility primitives
#75
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know! |
7a2cb59 to
94b0cdd
Compare
94b0cdd to
f60d9d3
Compare
cratedb_toolkit/util/database.py
Outdated
| pbar = ProgressBar() | ||
| pbar.register() | ||
|
|
||
| # Mangle data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry don't get, what do you mean mangle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a non-word, apologies. I've changed the comment to »Load data into database.« now.
cratedb_toolkit/util/database.py
Outdated
| # TODO: Use amount of CPU cores instead? | ||
| npartitions = npartitions or 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, lets do it? :)
Or any objections?
| # TODO: Use amount of CPU cores instead? | |
| npartitions = npartitions or 4 | |
| npartitions = npartitions or os.cpu_count() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with ffbb1a0.
ffbb1a0 to
2f7bcd6
Compare
2f7bcd6 to
9259e60
Compare
9259e60 to
e93902b
Compare
About
More yak shaving.
Details
Similar to pyveci/pueblo#12 and #74, this patch adds generalized testing helper functions to avoid code duplication within the educational repository cratedb-examples, originally conceived at crate/cratedb-examples@dd09e144ef0. We need those kinds of utility functions at many more spots, so we need to find canonical places to store them.
Synopsis
pip install 'cratedb-toolkit[io]'References
Notes
Note that details on the interface may change while we go, specifically on the "naming things" / DWIM side of things. If you have any suggestions, feel free to add your voice. Right now, the main focus is to ship it, to be able to re-use it on behalf of Jupyter Notebooks we are currently publishing, in order to reduce boilerplate code within them.
/cc @karynzv, @marijaselakovic, @hlcianfagna, @hammerhead, @WalBeh, @andnig, @ckurze, @vvulf