Skip to content

Issue with JSON Predicate Hint #744

Open
@sanket-coditas

Description

@sanket-coditas

Hi Team,

I am using Python pandas code to read the data from the delta table in databricks.

This table contains 8000 rows in total, however, I want to fetch the filtered data with a simple condition as "Title = Newyork". I am using the below JSON predict hint

hintOnHireDate = '''{
  "jsonPredicateHints": {
    "op": "equal",
    "children": [
      { "op": "column", "name": "Title", "valueType": "string" },
      { "op": "literal", "value": "Newyork", "valueType": "string" }
    ]
  }
}
'''
df = delta_sharing.load_as_pandas(table_url, jsonPredicateHints = hintOnHireDate)

Still, the df fetches all 8000 rows.

Is the syntax of the JSON predicate wrong? Or is this some bug in the library?

Can someone please help?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions