Skip to content

Commit 017e081

Browse files
committed
address dlq error
1 parent d4c704b commit 017e081

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

sdks/python/apache_beam/yaml/tests/iceberg_add_files.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,36 @@ pipelines:
7575
- {label: "3821b", rank: 3, bool: true}
7676
- {label: "990c", rank: 4, bool: true}
7777
- {label: "1024d", rank: 5, bool: false}
78+
79+
# Pipeline 4: Add an invalid file to trigger the DLQ
80+
- pipeline:
81+
type: composite
82+
transforms:
83+
- type: Create
84+
config:
85+
elements:
86+
- {file: "gs://dummy-bucket/does-not-exist.txt"}
87+
- type: IcebergAddFiles
88+
name: AddInvalidFile
89+
input: Create
90+
config:
91+
table: "default.table"
92+
location_prefix: "gs://dummy-bucket/"
93+
catalog_properties:
94+
type: "hadoop"
95+
warehouse: "{TEMP_DIR}/dir"
96+
error_handling:
97+
output: error_output
98+
- type: WriteToJson
99+
name: WriteErrorsToJson
100+
input: AddInvalidFile.error_output
101+
config:
102+
path: "{TEMP_DIR}/error.json"
103+
104+
# Pipeline 5: Ensure errors were written
105+
- pipeline:
106+
type: chain
107+
transforms:
108+
- type: ReadFromJson
109+
config:
110+
path: "{TEMP_DIR}/error.json*"

0 commit comments

Comments
 (0)