You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2023/03/04 07:30:27 UTC

[GitHub] [iceberg] Fokko commented on issue #5801: Read iceberg table into a PyArrow Dataset

Fokko commented on issue #5801:
URL: https://github.com/apache/iceberg/issues/5801#issuecomment-1454632236

   @djouallah you are right on that. 
   
   Currently, it is still a two-stage rocket, you first need to prune the data using the PyIceberg `row_filter`:
   
   ```python
   catalog = load_catalog('default')
   tbl = catalog.load_table('nyc.taxis')
   
   sc = tbl.scan(row_filter=And(
       GreaterThanOrEqual("tpep_pickup_datetime", "2022-01-01T00:00:00.000000+00:00")
       LessThan("tpep_pickup_datetime", "2022-02-01T00:00:00.000000+00:00")
   ).to_arrow() # Same for .to_duckdb()
   ```
   
   This will load all the data from January. If you don't pass in a `row_filter`, it will pull in the current version of the table. Right now, it won't push the predicate down to the Iceberg layer, unfortunately. This is something that we're working on but requires tighter integration with PyArrow and DuckDB.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org