Kaustav Ghosh
09/24/2024, 10:03 AMuser
09/24/2024, 10:04 AMbash
git clone <https://github.com/airbytehq/airbyte.git>
cd airbyte
cd airbyte-integrations/connector-templates/generator
./generate.sh
cd ../../connectors/source-survey-monkey-demo
poetry lock
poetry install --with dev
poetry run pytest unit_tests
poetry run source-survey-monkey-demo check --config secrets/config.json
2. Generate the Template: Use the Airbyte provided code generator which bootstraps the scaffolding for your connector. Select the Python CDK Source
and name it python-http-example
. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun)
bash
cd airbyte-integrations/connector-templates/generator
./generate.sh
3. Create Dev Environment: Change your working directory to the new connector module and install the dependencies. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun)
bash
cd ../../connectors/source-python-http-example
poetry install
4. Define Connector Inputs: Define your input schema to reflect the API you're working with. Open the spec.yaml
file and replace it with your schema. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun)
5. Define your Stream: In your source.py
file, add a class that represents an endpoint you want to hit. This stream should define your output schema for every endpoint that you want to implement. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun#define-your-stream)
6. Implement the Source Class: The Source
class implements the Spec
operation by looking for a file named spec.yaml
(or spec.json
) in the module's root by default. This is expected to be a json schema file that specifies the required configuration. [source](https://docs.airbyte.com/connector-development/cdk-python/basic-concepts#the-source-class)
7. Connecting to the API: Over the course of this tutorial, you'll be editing a few files that were generated by the code generator: manifest.yaml
, configured_catalog.json
, sample_state.json
. You'll also be creating the following files: config.json
, invalid_config.json
, rates.json
. [source](https://docs.airbyte.com/connector-development/config-based/tutorial/connecting-to-the-API-source)user
09/24/2024, 10:04 AMKaustav Ghosh
09/24/2024, 10:05 AMuser
09/24/2024, 10:05 AMuser
09/24/2024, 10:06 AMKaustav Ghosh
09/24/2024, 10:17 AMuser
09/24/2024, 10:17 AMuser
09/24/2024, 10:17 AM