You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/12 16:17:52 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

rdblue commented on a change in pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083#discussion_r706860066



##########
File path: site/docs/api.md
##########
@@ -70,6 +72,27 @@ Iterable<CombinedScanTask> tasks = scan.planTasks();
 
 Use `asOfTime` or `useSnapshot` to configure the table snapshot for time travel queries.
 
+#### Row level
+
+Iceberg table scans start by creating a `ScanBuilder` object with `IcebergGenerics.read`.
+
+```java
+ScanBuilder scanBuilder = IcebergGenerics.read(table)
+```
+
+To configure a scan, call `where` and `select` on the `ScanBuilder` to get a new `ScanBuilder` with those changes.
+
+```java
+scanBuilder.where(Expressions.equal("id", 5))
+```
+
+When a scan is configured, call method `build` to execute scan. `build` return `CloseableIterable<Record>`
+
+```java
+Iterable<Record> result = IcebergGenerics.read(table)

Review comment:
       Nit: this should be `CloseableIterable`.




-- 
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