Skip to content

Is it possible to pass query parameters? (:param or ?) #513

Description

@shner-elmo

Hey, I'm trying to port a query from duckdb to datafusion using the Python connector, the issue I'm facing, is adding query parameters.
Is there currently a way that I can pass query parameters ?

import datafusion
import pyarrow.dataset as ds

dataset = ds.dataset(...)

ctx = datafusion.SessionContext()
ctx.register_dataset('dataset', dataset)
table = ctx.sql("SELECT * FROM dataset WHERE col BETWEEN ? AND ?", parameters=[1, 10]).to_arrow_table()
## TypeError: SessionContext.sql() got an unexpected keyword argument 'parameters'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions