-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python-cdk] README cleanup (#37306)
- Loading branch information
1 parent
33235c8
commit e4c942e
Showing
2 changed files
with
116 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
27 changes: 19 additions & 8 deletions
27
airbyte-cdk/python/airbyte_cdk/connector_builder/README.md
This file contains 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 |
---|---|---|
@@ -1,42 +1,53 @@ | ||
# Connector Builder Backend | ||
|
||
This is the backend for requests from the [Connector Builder](https://docs.airbyte.com/connector-development/connector-builder-ui/overview/). | ||
This is the backend for requests from the | ||
[Connector Builder](https://docs.airbyte.com/connector-development/connector-builder-ui/overview/). | ||
|
||
## Local development | ||
|
||
### Locally running the Connector Builder backend | ||
|
||
``` | ||
```bash | ||
python main.py read --config path/to/config --catalog path/to/catalog | ||
``` | ||
|
||
Note: | ||
- Requires the keys `__injected_declarative_manifest` and `__command` in its config, where `__injected_declarative_manifest` is a JSON manifest and `__command` is one of the commands handled by the ConnectorBuilderHandler (`stream_read` or `resolve_manifest`), i.e. | ||
``` | ||
|
||
- Requires the keys `__injected_declarative_manifest` and `__command` in its config, where | ||
`__injected_declarative_manifest` is a JSON manifest and `__command` is one of the commands | ||
handled by the ConnectorBuilderHandler (`stream_read` or `resolve_manifest`), i.e. | ||
|
||
```json | ||
{ | ||
"config": <normal config>, | ||
"__injected_declarative_manifest": {...}, | ||
"__command": <"resolve_manifest" | "test_read"> | ||
} | ||
``` | ||
*See [ConnectionSpecification](https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#actor-specification) for details on the `"config"` key if needed. | ||
|
||
\*See | ||
[ConnectionSpecification](https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#actor-specification) | ||
for details on the `"config"` key if needed. | ||
|
||
- When the `__command` is `resolve_manifest`, the argument to `catalog` should be an empty string. | ||
- The config can optionally contain an object under the `__test_read_config` key which can define custom test read limits with `max_records`, `max_slices`, and `max_pages_per_slice` properties. All custom limits are optional; a default will be used for any limit that is not provided. | ||
- The config can optionally contain an object under the `__test_read_config` key which can define | ||
custom test read limits with `max_records`, `max_slices`, and `max_pages_per_slice` properties. | ||
All custom limits are optional; a default will be used for any limit that is not provided. | ||
|
||
### Locally running the docker image | ||
|
||
#### Build | ||
|
||
First, make sure you build the latest Docker image: | ||
``` | ||
|
||
```bash | ||
docker build -t airbyte/source-declarative-manifest:dev . | ||
``` | ||
|
||
#### Run | ||
|
||
Then run any of the connector commands as follows: | ||
|
||
``` | ||
```bash | ||
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-declarative-manifest:dev read --config /secrets/config.json | ||
``` |