* New connector_builder module for handling requests from the Connector Builder. Also implements `resolve_manifest` handler * Automated Commit - Formatting Changes * Rename ConnectorBuilderSource to ConnectorBuilderHandler * Update source_declarative_manifest README * Reorganize * read records * paste unit tests from connector builder server * compiles but tests fail * first test passes * Second test passes * 3rd test passes * one more test * another test * one more test * test * return StreamRead * test * test * rename * test * test * test * main seems to work * Update * Update * Update * Update * update * error message * rename * update * Update * CR improvements * fix test_source_declarative_manifest * fix tests * Update * Update * Update * Update * rename * rename * rename * format * Give connector_builder its own main.py * Update * reset * delete dead code * remove debug print * update test * Update * set right stream * Add --catalog argument * Remove unneeded preparse * Update README * handle error * tests pass * more explicit test * reset * format * fix merge * raise exception * fix * black format * raise with config * update * fix flake * __test_read_config is optional * fix * Automated Commit - Formatting Changes * fix * exclude_unset --------- Co-authored-by: Catherine Noll <noll.catherine@gmail.com> Co-authored-by: clnoll <clnoll@users.noreply.github.com> Co-authored-by: girarda <girarda@users.noreply.github.com>
28 lines
796 B
Python
28 lines
796 B
Python
#
|
|
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
#
|
|
|
|
from typing import Any, Mapping
|
|
|
|
from airbyte_cdk.models.airbyte_protocol import ConfiguredAirbyteCatalog
|
|
|
|
|
|
def create_configured_catalog_dict(stream_name: str) -> Mapping[str, Any]:
|
|
return {
|
|
"streams": [
|
|
{
|
|
"stream": {
|
|
"name": stream_name,
|
|
"json_schema": {},
|
|
"supported_sync_modes": ["full_refresh", "incremental"],
|
|
},
|
|
"sync_mode": "full_refresh",
|
|
"destination_sync_mode": "overwrite",
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
def create_configured_catalog(stream_name: str) -> ConfiguredAirbyteCatalog:
|
|
return ConfiguredAirbyteCatalog.parse_obj(create_configured_catalog_dict(stream_name))
|