-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 32871/extract trace message creation (#33227)
- Loading branch information
Showing
22 changed files
with
384 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
|
||
from typing import Any, Dict, List | ||
|
||
from airbyte_protocol.models import ConfiguredAirbyteCatalog, SyncMode | ||
|
||
|
||
class CatalogBuilder: | ||
def __init__(self) -> None: | ||
self._streams: List[Dict[str, Any]] = [] | ||
|
||
def with_stream(self, name: str, sync_mode: SyncMode) -> "CatalogBuilder": | ||
self._streams.append( | ||
{ | ||
"stream": { | ||
"name": name, | ||
"json_schema": {}, | ||
"supported_sync_modes": ["full_refresh", "incremental"], | ||
"source_defined_primary_key": [["id"]], | ||
}, | ||
"primary_key": [["id"]], | ||
"sync_mode": sync_mode.name, | ||
"destination_sync_mode": "overwrite", | ||
} | ||
) | ||
return self | ||
|
||
def build(self) -> ConfiguredAirbyteCatalog: | ||
return ConfiguredAirbyteCatalog.parse_obj({"streams": self._streams}) |
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 was deleted.
Oops, something went wrong.
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,6 @@ | ||
from airbyte_cdk.test.mock_http.matcher import HttpRequestMatcher | ||
from airbyte_cdk.test.mock_http.request import HttpRequest | ||
from airbyte_cdk.test.mock_http.response import HttpResponse | ||
from airbyte_cdk.test.mock_http.mocker import HttpMocker | ||
|
||
__all__ = ["HttpMocker", "HttpRequest", "HttpRequestMatcher", "HttpResponse"] |
2 changes: 1 addition & 1 deletion
2
...k/python/airbyte_cdk/test/http/matcher.py → ...hon/airbyte_cdk/test/mock_http/matcher.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
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
File renamed without changes.
File renamed without changes.
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
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
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.