ForeverAngry commented on issue #2222:
URL:
https://github.com/apache/iceberg-python/issues/2222#issuecomment-3094645983
@jayceslesar your thinking something like this, yeah?
```python
def scan_by_tag(
self,
tag_name: str,
row_filter: Union[str, BooleanExpression] = ALWAYS_TRUE,
selected_fields: Tuple[str, ...] = ("*",),
case_sensitive: bool = True,
options: Properties = EMPTY_DICT,
limit: Optional[int] = None,
) -> DataScan:
"""
Fetch a DataScan for the snapshot referenced by the given tag.
"""
snapshot = self.snapshot_by_name(tag_name)
if snapshot is None:
raise ValueError(f"Tag '{tag_name}' does not exist or is not a valid
tag.")
return self.scan(
row_filter=row_filter,
selected_fields=selected_fields,
case_sensitive=case_sensitive,
snapshot_id=snapshot.snapshot_id,
options=options,
limit=limit,
)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]