Skip to content

Commit

Permalink
feat: Targets now emit record count from the built-in batch file proc…
Browse files Browse the repository at this point in the history
…essor
  • Loading branch information
edgarrmondragon committed Oct 4, 2024
1 parent 409a40b commit 3167340
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions singer_sdk/sinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ def process_batch_files(
}
else:
context = {"records": [deserialize_json(line) for line in file]}
self.record_counter_metric.increment(len(context["records"]))
self.process_batch(context)
elif (
importlib.util.find_spec("pyarrow")
Expand All @@ -765,6 +766,7 @@ def process_batch_files(
) as file:
table = pq.read_table(file)
context = {"records": table.to_pylist()}
self.record_counter_metric.increment(len(context["records"]))
self.process_batch(context)
else:
msg = f"Unsupported batch encoding format: {encoding.format}"
Expand Down

0 comments on commit 3167340

Please sign in to comment.