Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion airbyte/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ def _resolve_source_job(
)


def _get_noop_destination_config() -> dict[str, Any]:
return {
"test_destination": {
"test_destination_type": "SILENT",
}
}


def _resolve_destination_job(
*,
destination: str,
Expand All @@ -259,7 +267,19 @@ def _resolve_destination_job(
config: The path to a configuration file for the named source or destination.
pip_url: Optional. A location from which to install the connector.
"""
config_dict = _resolve_config(config) if config else None
config_dict = _resolve_config(config) if config else {}
destination_name = _get_connector_name(destination)

if destination_name == "destination-dev-null" and not config:
config_dict = _get_noop_destination_config()

if _is_docker_image(destination):
return get_destination(
name=destination_name,
docker_image=destination,
config=config_dict,
pip_url=pip_url,
)

if destination and (destination.startswith(".") or "/" in destination):
# Treat the destination as a path.
Expand Down
6 changes: 1 addition & 5 deletions airbyte/destinations/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ def get_noop_destination(
"destination-dev-null",
config={
"test_destination": {
"test_destination_type": "LOGGING",
"logging_config": {
"logging_type": "FirstN",
"max_entry_count": 100,
},
"test_destination_type": "SILENT",
}
},
docker_image=True,
Expand Down