-
Notifications
You must be signed in to change notification settings - Fork 32
docs: add Readme for sdm commands #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f0b8545
add docs for local SDM usage
ChristoGrab b2e43b6
add options table
ChristoGrab 61b539d
Update airbyte_cdk/cli/source_declarative_manifest/README.md
ChristoGrab 81020c1
docs: integrate the SDM readme into `pdoc` (targets #620) (#621)
aaronsteers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Source Declarative Manifest CLI | ||
|
|
||
| The source-declarative-manifest CLI is included in the airbyte-cdk package. | ||
| This CLI enables connector interfaces to be run locally on manifest-only connectors, | ||
| much like we already do with Python connectors. | ||
|
|
||
| ## Installation | ||
|
|
||
| The airbyte-cdk library can be installed globally using pipx: | ||
|
|
||
| ```bash | ||
| pipx install airbyte-cdk | ||
| ``` | ||
|
|
||
| If you are using a cloned airbyte-python-cdk repo locally, | ||
| you can also create a virtual environment to enable the CLI. | ||
| From the root directory of airbyte-python-cdk: | ||
|
|
||
| ```bash | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Options | ||
|
|
||
| --help: displays the list of available commands | ||
|
|
||
| ### Commands | ||
|
|
||
| - spec: Outputs the JSON configuration specification. NOTE: This currently just outputs the base source-declarative-manifest spec | ||
| - check: Runs a connection_check to verify a connection can be made with the passed config | ||
| - discover: Outputs a catalog describing the source's schema | ||
| - read: Reads the source using the passed config and catalog, and outputs messages to STDOUT | ||
|
|
||
| ### Command options | ||
|
|
||
| - --config: The relative path to the config to inject into SDM. | ||
| - --catalog: The relative path to the configured catalog. | ||
| - --state: The relative path to the state object to pass. Only used when running an incremental read. | ||
| - --manifest-path: The relative path to the local YAML manifest to inject into SDM. | ||
| - --components-path: The relative path to the custom components to mount, if they exist. | ||
|
|
||
| | Option | spec | check | discover | read | | ||
| | ------------------- | ---- | -------- | -------- | -------- | | ||
| | `--config` | ❌ | required | required | required | | ||
| | `--catalog` | ❌ | ❌ | required | required | | ||
| | `--state` | ❌ | ❌ | ❌ | optional | | ||
| | `--manifest-path` | ❌ | required | required | required | | ||
| | `--components-path` | ❌ | optional | optional | optional | | ||
|
|
||
| ### Examples | ||
|
|
||
| Here are some basic examples of how to run source-declarative-manifest commands locally. | ||
| Note that the paths are relative. These example assume the user is currently at the root level of a connector dir: | ||
|
|
||
| ```bash | ||
| source-declarative-manifest check --config secrets/config.json --manifest-path manifest.yaml | ||
| ``` | ||
|
|
||
| ```bash | ||
| source-declarative-manifest read --config secrets/config.json --catalog integration_tests/configured_catalog.json --manifest-path manifest.yaml --components-path components.py | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.