Skip to content

Commit

Permalink
Add description for AirbyteEstimateTraceMessage types (#19843)
Browse files Browse the repository at this point in the history
* Add description for `AirbyteEstimateTraceMessage` types

* cleanup

* update python CDK docs too
  • Loading branch information
evantahler authored Nov 28, 2022
1 parent 61bf812 commit 1598126
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ class Config:
extra = Extra.allow

name: str = Field(..., description="The name of the stream")
type: EstimateType = Field(..., description="The type of estimate", title="estimate type")
type: EstimateType = Field(
...,
description="Estimates are either per-stream (STREAM) or for the entire sync (SYNC). STREAM is preferred, and requires the source to count how many records are about to be emitted per-stream (e.g. there will be 100 rows from this table emitted). For the rare source which cannot tell which stream a record belongs to before reading (e.g. CDC databases), SYNC estimates can be emitted. Sources should not emit both STREAM and SOURCE estimates within a sync.\n",
title="estimate type",
)
namespace: Optional[str] = Field(None, description="The namespace of the stream")
row_estimate: Optional[int] = Field(
None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ definitions:
type: string
type:
title: "estimate type" # this title is required to avoid python codegen conflicts with the "type" parameter in AirbyteMessage. See https://github.com/airbytehq/airbyte/pull/12581
description: The type of estimate
description: >
Estimates are either per-stream (STREAM) or for the entire sync (SYNC).
STREAM is preferred, and requires the source to count how many records are about to be emitted per-stream (e.g. there will be 100 rows from this table emitted).
For the rare source which cannot tell which stream a record belongs to before reading (e.g. CDC databases), SYNC estimates can be emitted.
Sources should not emit both STREAM and SOURCE estimates within a sync.
type: string
enum:
- STREAM
Expand Down

0 comments on commit 1598126

Please sign in to comment.