|
| 1 | +# Source Declarative Manifest CLI |
| 2 | + |
| 3 | +The source-declarative-manifest CLI is included in the airbyte-cdk package. |
| 4 | +This CLI enables connector interfaces to be run locally on manifest-only connectors, |
| 5 | +much like we already do with Python connectors. |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +The airbyte-cdk library can be installed globally using pipx: |
| 10 | + |
| 11 | +```bash |
| 12 | +pipx install airbyte-cdk |
| 13 | +``` |
| 14 | + |
| 15 | +If you are using a cloned airbyte-python-cdk repo locally, |
| 16 | +you can also create a virtual environment to enable the CLI. |
| 17 | +From the root directory of airbyte-python-cdk: |
| 18 | + |
| 19 | +```bash |
| 20 | +python -m venv .venv |
| 21 | +source .venv/bin/activate |
| 22 | +pip install -e . |
| 23 | +``` |
| 24 | + |
| 25 | +## Usage |
| 26 | + |
| 27 | +### Options |
| 28 | + |
| 29 | +--help: displays the list of available commands |
| 30 | + |
| 31 | +### Commands |
| 32 | + |
| 33 | +- spec: Outputs the JSON configuration specification. NOTE: This currently just outputs the base source-declarative-manifest spec |
| 34 | +- check: Runs a connection_check to verify a connection can be made with the passed config |
| 35 | +- discover: Outputs a catalog describing the source's schema |
| 36 | +- read: Reads the source using the passed config and catalog, and outputs messages to STDOUT |
| 37 | + |
| 38 | +### Command options |
| 39 | + |
| 40 | +- --config: The relative path to the config to inject into SDM. |
| 41 | +- --catalog: The relative path to the configured catalog. |
| 42 | +- --state: The relative path to the state object to pass. Only used when running an incremental read. |
| 43 | +- --manifest-path: The relative path to the local YAML manifest to inject into SDM. |
| 44 | +- --components-path: The relative path to the custom components to mount, if they exist. |
| 45 | + |
| 46 | +| Option | spec | check | discover | read | |
| 47 | +| ------------------- | ---- | -------- | -------- | -------- | |
| 48 | +| `--config` | ❌ | required | required | required | |
| 49 | +| `--catalog` | ❌ | ❌ | required | required | |
| 50 | +| `--state` | ❌ | ❌ | ❌ | optional | |
| 51 | +| `--manifest-path` | ❌ | required | required | required | |
| 52 | +| `--components-path` | ❌ | optional | optional | optional | |
| 53 | + |
| 54 | +### Examples |
| 55 | + |
| 56 | +Here are some basic examples of how to run source-declarative-manifest commands locally. |
| 57 | +Note that the paths are relative. These examples assume the user is currently at the root level of a connector dir: |
| 58 | + |
| 59 | +```bash |
| 60 | +source-declarative-manifest check --config secrets/config.json --manifest-path manifest.yaml |
| 61 | +``` |
| 62 | + |
| 63 | +```bash |
| 64 | +source-declarative-manifest read --config secrets/config.json --catalog integration_tests/configured_catalog.json --manifest-path manifest.yaml --components-path components.py |
| 65 | +``` |
0 commit comments