This commit is contained in:
2025-07-26 19:44:11 +02:00
parent c184d062ef
commit 891680bb05
2 changed files with 23 additions and 1 deletions

22
apps/test/io.py Normal file
View File

@@ -0,0 +1,22 @@
from typing import Any, Optional
class MyIOManager(PolarsParquetIOManager):
def _load_partition_from_path(
self,
context: InputContext,
partition_key: str,
path: "UPath",
backcompat_path: Optional["UPath"] = None,
) -> Any:
try:
return super()._load_partition_from_path(
context, partition_key, path, backcompat_path
)
except FileNotFoundError:
# Handle the case where the partition file does not exist
context.log.warning(
f"Partition file not found for key {partition_key} at path {path}. "
"Returning an empty DataFrame."
)
return None

View File

@@ -5,4 +5,4 @@ networks:
include: include:
- compose.system.yaml - compose.system.yaml
- compose.code.yaml - compose.code.yaml