<@U04S8PLJWMT> i have a python cdk connector but i...
# ask-ai
o
@kapa.ai i have a python cdk connector but i want to get the source inputs config pattern. how can i get them from the abstractsource class?
k
Based on the knowledge sources, I can help you understand how to get the source input configuration pattern from the
AbstractSource
class in a Python CDK connector. The
AbstractSource
class implements the
Spec
operation, which defines the required configuration for your connector. According to the [Basic Concepts documentation](https://docs.airbyte.com/platform/connector-development/cdk-python/basic-concepts), the
Source
class (which
AbstractSource
extends) implements the
Spec
operation by looking for a file named
spec.yaml
or
spec.json
in the module's root by default. Here's how it works: 1. The spec file location: The configuration pattern is defined in a
spec.yaml
(or
spec.json
) file that should be placed in your connector's module root directory. 2. What the spec contains: This file is a JSON schema that specifies the required configuration parameters. The
config
parameter in your
check_connection
function contains the user-provided configuration as specified in this
spec.yaml
file. 3. Accessing the config: In your
AbstractSource
implementation, you can access the configuration through: - The
check_connection
function, which receives a
config
parameter - The
streams
function, which also receives a
config
parameter The knowledge sources show an example from the Exchange Rates source connector that demonstrates this pattern. The spec file defines what configuration inputs are required, and these are then available to your connector methods through the
config
parameter. If you need to see the actual spec schema for your connector, you should look for the
spec.yaml
or
spec.json
file in your connector's root directory. This file defines the input configuration pattern that users will need to provide when setting up your source.