nyep
06/03/2024, 3:06 AMdef get_source(
name: str,
config: dict[str, Any] | None = None,
*,
streams: str | list[str] | None = None,
version: str | None = None,
pip_url: str | None = None,
local_executable: Path | str | None = None,
install_if_missing: bool = True,
)
how to set local_excutablekapa.ai
06/03/2024, 3:06 AMlocal_executable
parameter in the get_source
function, you need to provide a path to the local executable file. This path should be an absolute path on your machine. If you are working with a local filesystem, you might need to adjust some environment variables as well. Here is an example of how you might set the local_executable
parameter: python from pathlib import Path source = get_source( name="your_source_name", config={"key": "value"}, streams="your_stream_name", local_executable=Path("/absolute/path/to/your/local/executable") )
If you are working with a local filesystem on Windows OS, you might need to adjust the .env
file in your local Airbyte root folder. Specifically, you need to set the following environment variables to an existing absolute path on your machine, replacing colons in the path with double forward slashes (//
): - LOCAL_ROOT
- LOCAL_DOCKER_MOUNT
- HACK_LOCAL_ROOT_PARENT
Here is an example of how to set these variables in the .env
file: LOCAL_ROOT=C://path//to//your//local//root LOCAL_DOCKER_MOUNT=C://path//to//your//local//root HACK_LOCAL_ROOT_PARENT=C://path//to
For more details, you can refer to the [Local Filesystem setup guide](https://docs.airbyte.com/integrations/sources/file#local-filesystem-airbyte-open-source-only). If you need further assistance, please refer to the [Airbyte documentation](https://docs.airbyte.com/).nyep
06/03/2024, 3:28 AM