Skip to content

Commit

Permalink
Log stream_instance's metadata (#15025)
Browse files Browse the repository at this point in the history
* Log stream_instance's metadata

* syncmode is only set on ConfiguredStream

* log both configured stream and stream instance
  • Loading branch information
girarda authored Jul 26, 2022
1 parent 37e4453 commit 0f25ba6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions airbyte-cdk/python/airbyte_cdk/sources/abstract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,21 @@ def _read_stream(
if internal_config.page_size and isinstance(stream_instance, HttpStream):
logger.info(f"Setting page size for {stream_instance.name} to {internal_config.page_size}")
stream_instance.page_size = internal_config.page_size

logger.debug(
f"Syncing stream: {configured_stream.stream.name}",
f"Syncing configured stream: {configured_stream.stream.name}",
extra={
"sync_mode": configured_stream.sync_mode,
"primary_key": configured_stream.primary_key,
"cursor_field": configured_stream.cursor_field,
},
)
logger.debug(
f"Syncing stream instance: {stream_instance.name}",
extra={
"primary_key": stream_instance.primary_key,
"cursor_field": stream_instance.cursor_field,
},
)

use_incremental = configured_stream.sync_mode == SyncMode.incremental and stream_instance.supports_incremental
if use_incremental:
Expand Down

0 comments on commit 0f25ba6

Please sign in to comment.