forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ingest/bigquery): Lowering significantly the memory usage of the …
…BigQuery connector (datahub-project#7315)
- Loading branch information
Showing
11 changed files
with
223 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
metadata-ingestion/src/datahub/ingestion/sink/blackhole.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import logging | ||
|
||
from datahub.configuration.common import ConfigModel | ||
from datahub.ingestion.api.common import RecordEnvelope | ||
from datahub.ingestion.api.sink import Sink, SinkReport, WriteCallback | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class BlackHoleSink(Sink[ConfigModel, SinkReport]): | ||
def write_record_async( | ||
self, record_envelope: RecordEnvelope, write_callback: WriteCallback | ||
) -> None: | ||
if write_callback: | ||
self.report.report_record_written(record_envelope) | ||
write_callback.on_success(record_envelope, {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.