airbyte-integrations/connectors/source-mysql/README.md
This is the repository for the MySQL only source connector in Java. For information about how to use this connector within Airbyte, see User Documentation
From the Airbyte repository root, run:
./gradlew :airbyte-integrations:connectors:source-mysql:build
Build the connector image via Gradle:
./gradlew :airbyte-integrations:connectors:source-mysql:buildConnectorImage
Once built, the docker image name and tag on your host will be airbyte/source-mysql:dev.
the Dockerfile.
We use JUnit for Java tests.
To run acceptance and custom integration tests:
./gradlew :airbyte-integrations:connectors:source-mysql:integrationTest
To run performance tests in commandline:
./gradlew :airbyte-integrations:connectors:source-mysql:performanceTest [--cpulimit=cpulimit/<limit>] [--memorylimit=memorylimit/<limit>]
In pull request:
/test-performance connector=connectors/source-mysql [--cpulimit=cpulimit/<limit>] [--memorylimit=memorylimit/<limit>]
cpulimit: Limit the number of CPUs. The minimum is 2. E.g. --cpulimit=cpulimit/2.memorylimit: Limit the size of the memory. Must include the unit at the end (e.g. MB, GB). The minimum size is 6MB. E.g. --memorylimit=memorylimit/4GB.ResourceRequirements.java.In order to create a database with a certain number of tables, and a certain number of records in each of them, you need to follow a few simple steps.
cd airbyte-integrations/connectors/source-mysql
mysql -h hostname -u user database < src/test-performance/sql/create_mysql_benchmarks.sql