Skip to content

feat: New functionality to upsert (and more) #11365

Open
@KronosTheLate

Description

@KronosTheLate

Is your feature request related to a problem?

I am missing the ability to upsert a table into another table. Not when writing a table to disk to a path with an existing table, but just as in combining two tables in the current session.

What is the motivation behind your request?

No response

Describe the solution you'd like

The polars function update does what I am looking for. That API seems fine to me, but I believe that in general ibis tries to follow dplyr naming conventions. Fortunately, dplyr has multiple related functions, as detailed here.

The following functionality can already be achieved in ibis:

  • union covers the rows_append
  • An anti_join would cover rows_delete

But for these functions, I am unable to find an equivalent:

  • rows_insert
  • rows_update
  • rows_patch
  • rows_upsert

If we had the ability to pass keys to the union function, then we could get rows_insert as well. This would again allow combining an anti-join with a rows_insert to implement upsert and update. So a lot would be done by allowing keys to be passed to the existing union function. However, these explicit funcitons are still really really nice to have.

What version of ibis are you running?

None

What backend(s) are you using, if any?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeatures or general enhancements

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions