1
0
mirror of synced 2026-01-05 12:05:28 -05:00
Files
airbyte/airbyte-cdk/python/airbyte_cdk/connector_builder
Alexandre Girard 3ae73fb0ff connector builder: Set test_read_limit_reached to true if we hit the max records limit (#28293)
* set test_read_limit_reached to true if we hit the max records limit

* rename slice to _slice to avoid shadowing a builtin keyword

* newline

* fix some of the typing issues

* fix some more typing issues

* another fix

* fix last typing issue

* format

* Automated Commit - Formatting Changes

* reset type

* fix the type

* Update for clarity

* Update types

---------

Co-authored-by: girarda <girarda@users.noreply.github.com>
2023-07-18 15:53:53 -07:00
..

Connector Builder Backend

This is the backend for requests from the Connector Builder.

Local development

Locally running the Connector Builder backend

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, list_streams, or resolve_manifest), i.e.
{
  "config": <normal config>,
  "__injected_declarative_manifest": {...},
  "__command": <"resolve_manifest" | "list_streams" | "test_read">
}

*See ConnectionSpecification for details on the "config" key if needed.

  • When the __command is list_streams or resolve_manifest, the argument to catalog should be an empty string.

Locally running the docker image

Build

First, make sure you build the latest Docker image:

./gradlew airbyte-cdk:python:airbyteDocker

The docker image name and tag, respectively, are the values of the io.airbyte.name and io.airbyte.version LABELs in the Dockerfile.

Run

Then run any of the connector commands as follows:

docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-declarative-manifest:dev read --config /secrets/config.json