Git Product home page Git Product logo

Comments (4)

cpcloud avatar cpcloud commented on August 29, 2024

I think having separate methods makes sense for this, while keyword arguments clutter the API.

How about load_* equivalents that unconditionally persist data and mirror the read_* APIs?

from ibis.

cpcloud avatar cpcloud commented on August 29, 2024

I think best distinction we can do between any approach here is:

  1. Things persist after the session ends
  2. Things do not persist after the session ends

The former almost certainly requires physical storage (ruling out views), while the latter can be more less or whatever's well-suited to backend.

If people need something specific, they have to call create_{view,table}

from ibis.

jcrist avatar jcrist commented on August 29, 2024

I think having separate methods makes sense for this, while keyword arguments clutter the API.

If these APIs are identical except for how the backend loads the data (a binary option), I'd argue that a keyword argument makes more sense than duplicate methods which do the same thing for most backends.

How about

# cache=False is whatever the backend currently does, cache=True always uses a table
t = con.read_parquet(..., cache=True)

How about load_* equivalents that unconditionally persist data and mirror the read_* APIs?

I hadn't considered the temporary/persistent choice, but I suppose that is another axis. Since our read_* methods generate a unique name by default (and anything that persists permanently should probably have an explicit name), I'm not sure if a binary modality here would make sense, and agree a new load_* method might make more sense (so we could better indicate and enforce that table_name is required).

In my case though, I don't really want a persistent table, but do want the load to happen only once for the lifetime of the session. In this case a simple kwarg (that really only needs to be implemented by the few backends that use views by default) seems like the simpler option.

from ibis.

jcrist avatar jcrist commented on August 29, 2024

After talking this through, I think this issue would be better resolved through fixing #6195, and documenting this pattern for backends where it's relevant (mostly just duckdb). Closing.

from ibis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.