Hello team!. I'm building my destination-mysql con...
# help-connector-development
d
Hello team!. I'm building my destination-mysql connector custom. It's working for me, but I have trouble when It's not support normalization. So how to add normalization to my connector?
k
A message from kapa.ai
To add normalization to your custom MySQL destination connector, you need to set some fields in the destination definitions entry for the connector. This is done in the
metadata.yaml
file found at the root of each connector. Here's an example of how to set normalization fields for the Postgres destination, which you can adapt for your MySQL destination:
Copy code
yaml data:    # ... other fields    normalizationConfig:    normalizationRepository: airbyte/normalization    normalizationTag: 0.2.25    normalizationIntegrationType: mysql
The
normalizationConfig
field should include the
normalizationRepository
,
normalizationTag
, and
normalizationIntegrationType
fields. The presence of these fields will enable normalization for the connector, and determine which docker image will run. For more information about what these fields mean, see the [NormalizationDestinationDefinitionConfig](https://github.com/airbytehq/airbyte/blob/master/airbyte-config-oss/config-models-oss/src/main/resources/types/NormalizationDestinationDefinitionConfig.yaml) schema. In addition, you need to set
supportsNormalization
and
supportsDBT
to
true
in the
spec.json
file. These fields indicate that your connector supports basic normalization via DBT and is compatible with DBT, respectively.
Copy code
json {   "supportsNormalization": true,   "supportsDBT": true }
After setting these fields, you can build the normalization docker image and run the integration tests. Here's an example of how to do this for the DuckDB destination, which you can adapt for your MySQL destination:
Copy code
bash #build normalization cd airbyte-integrations/connectors/destination-mysql docker build . -t airbyte/normalization-mysql:0.1.0 -t airbyte/normalization-mysql:0.2.25 --no-cache  cd ../../.. ./gradlew :airbyte-integrations:bases:base-normalization:airbyteDockerMysql && docker tag airbyte/normalization-mysql:dev airbyte/normalization-mysql:0.2.25
For more information, see the [Connector Development](https://docs.airbyte.com/connector-development/) and [Adding Normalization to a Connector](https://docs.airbyte.com/connector-development/#adding-normalization-to-a-connector) documentation. Sources: - [Connector Development](https://docs.airbyte.com/connector-development) - [Adding normalization to a connector](https://docs.airbyte.com/connector-development/#adding-normalization-to-a-connector) - [Building a Python Destination](https://docs.airbyte.com/connector-development/tutorials/building-a-python-destination) - [Creating a Python Destination](https://airbyte.com/tutorials/creating-duckdb-destination-with-python) - [Previous Support Conversation in Slack](https://airbytehq.slack.com/archives/C021JANJ6TY/p1676447835650409)