Skip to content

Support registering views #1004

@matko

Description

@matko

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I am trying to create a view over a set of parquet files that I often need to query together in a particular way.
Datafusion supports views, essentially logical plans that are registered as a table (through ViewTable). Unfortunately, this functionality is not exposed in the python bindings.

Describe the solution you'd like
Expose ViewTable in the datafusion-python bindings, so that they can be created from a LogicalPlan and then registered with SessionContext.register_table.

Describe alternatives you've considered
There is also a DDL syntax for creating views. This works fine in many scenarios, but is less ideal in dynamic scenarios where it means having to compose a view as a string. This leads to all sorts of potential injection problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions