Skip to content
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

feat: Table.to_records() #9185

Open
NickCrews opened this issue May 13, 2024 · 0 comments
Open

feat: Table.to_records() #9185

NickCrews opened this issue May 13, 2024 · 0 comments

Comments

@NickCrews
Copy link
Contributor

In many places in my code I do something like table.to_pandas().to_records(). It could be nice to have a method that goes straight there. IDK, not a huge deal, the existing solution is really not that bad. But just wanted to get an issue up for discussion.

Based on @mw3i in #5391 (comment)_:

Sorry for the late reply. Since ibis doesn't have upsert, our team uses the dataset library for inserts/updates/upserts. We do all our normal code in ibis, and then updates/upserts are done with:

import dataset

params = f"{dialect}://{user}:{password}@{url}:{port}/{database}" # <-- sqlalchemy database uri string
with dataset.connect(params) as dbx:
    dbx[tablename].upsert_many(
        list_of_dictionaries, # <-- each dict is a db entry
        column_to_use_as_identifier,
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: backlog
Development

No branches or pull requests

1 participant