Skip to content

Commit f10933f

Browse files
authored
Feat: Added use_host_network param to get_destination() (#364)
1 parent 2f27c87 commit f10933f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

airbyte/destinations/util.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_destination(
2424
pip_url: str | None = None,
2525
local_executable: Path | str | None = None,
2626
docker_image: str | bool | None = None,
27+
use_host_network: bool = False,
2728
install_if_missing: bool = True,
2829
) -> Destination:
2930
"""Get a connector by name and version.
@@ -47,6 +48,10 @@ def get_destination(
4748
to use the default image for the connector, or you can specify a custom image name.
4849
If `version` is specified and your image name does not already contain a tag
4950
(e.g. `my-image:latest`), the version will be appended as a tag (e.g. `my-image:0.1.0`).
51+
use_host_network: If set, along with docker_image, the connector will be executed using
52+
the host network. This is useful for connectors that need to access resources on
53+
the host machine, such as a local database. This parameter is ignored when
54+
`docker_image` is not set.
5055
install_if_missing: Whether to install the connector if it is not available locally. This
5156
parameter is ignored when local_executable is set.
5257
"""
@@ -64,6 +69,7 @@ def get_destination(
6469
pip_url=pip_url,
6570
local_executable=local_executable,
6671
docker_image=docker_image,
72+
use_host_network=use_host_network,
6773
install_if_missing=install_if_missing,
6874
),
6975
)

0 commit comments

Comments
 (0)