Skip to content

Commit 6175517

Browse files
authored
Add example of using jsonPredicateHints for load_as_pandas in README (#658)
1 parent e1c34ed commit 6175517

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ delta_sharing.load_as_pandas(table_url)
102102
# Load a table as a Pandas DataFrame explicitly using Delta Format
103103
delta_sharing.load_as_pandas(table_url, use_delta_format = True)
104104

105+
# Load a table as a Pandas DataFrame explicitly using jsonPredicateHints
106+
hintOnHireDate = '''{
107+
"op": "equal",
108+
"children": [
109+
{"op": "column", "name":"hireDate", "valueType":"date"},
110+
{"op":"literal","value":"2021-04-29","valueType":"date"}
111+
]
112+
}'''
113+
delta_sharing.load_as_pandas(table_url, jsonPredicateHints = hintOnHireDate)
114+
105115
# If the code is running with PySpark, you can use `load_as_spark` to load the table as a Spark DataFrame.
106116
delta_sharing.load_as_spark(table_url)
107117
```

0 commit comments

Comments
 (0)