1
0
mirror of synced 2025-12-21 02:51:29 -05:00
Commit Graph

362 Commits

Author SHA1 Message Date
LiRen Tu
6843bc1d1f 🎉 Source MySQL: support all MySQL 8.0 types (#7970)
* Add jdbc compatible layer

* Support routine mysql types

* Format code

* Fix build

* Refactor abstract jdbc source and operation classes

* Update mysql source operations

* Test discover command for mysql

* Remove abstract jdbc compatible source layer

* Format code

* Update template

* Fix more types

* Bump version

* Log original field type

* Update comments

* Bump version in seed
2021-12-11 21:49:32 -08:00
oneshcheret
fcf7491fee 🐛 Validate incorrect handling '\n' symbols in ssh key (#8371)
* 🐛 Validate \n in ssh key

* bump versions for ssh key connectors

* update versions for ssh key connectors

* temporal fix for checking failed tests

* revert temp changes and destination oracle version

* bump versions in config for ssh key related connectors
2021-12-03 20:11:51 +02:00
oneshcheret
70ed18b89e 🐛 Fix handling binary data type for Mssql source (#7748)
* Fix data type tests Mssql source

* update test for boolean data type in  Mysql source

* dump versions for Mssql and Mysql source

* revert changes regarding handling bit data type

* revert changes regarding date and time data type tests Mssql source

* revert changes regarding date data type for Mssql source

* update message in mssql.md

* minor format changes

* format changes
2021-11-11 14:15:23 +02:00
Yurii Bidiuk
56db8065e9 🐛 Source MSSQL: fix data type (smalldatetime, smallmoney) conversion from mssql source (#5609) (#7386)
* Fix data type (smalldatetime, smallmoney) conversion from mssql source (#5609)

* Fixed code format

* Bumb new version

* Update documentation (mssql.md)

* formating

* fixed converter properties

* aligned converter utils with #7339

Co-authored-by: Andrii Leonets <30464745+DoNotPanicUA@users.noreply.github.com>
2021-11-05 12:21:07 +02:00
Harsha Teja Kanna
3e7f95c25a 🎉 Support build on MacOS M1 (Apple Silicon) (#7104)
- See this doc for details: https://github.com/airbytehq/airbyte/blob/master/docs/contributing-to-airbyte/developing-locally.md
- Unit test does not work yet.
2021-10-19 11:20:21 -07:00
Charles
ba44f700b9 add final for params, local variables, and fields (#7084) 2021-10-15 16:41:04 -07:00
irynakruk
be922780a7 Added MSSql secure only source (#6754)
* Added new MSSql Secure Source
2021-10-08 15:15:52 -04:00
Davin Chia
5a3353dcf5 Bootstrap initial custom metrics library (#6529)
Wrapper around Prometheus lib to interface with Datadog.

We use prometheus because:
- Future-proofing as it's uses the general open metrics format.
- Prometheus makes it's metrics available to a scraper to it lends itself better to the OSS set up.
- Datadog automatically converts promethues metrics into dd metrics so we don't lose much.
2021-10-05 21:51:34 +08:00
oneshcheret
11561290be 🎉 Source MSSQL: Implement SSH bastion for acceptance/integration tests (#6608)
* 🎉 Source MSSQL: Implement SSH bastion for acceptance/integration tests

* 🎉 Source MSSQL: remove ci creds for mssql source
2021-10-04 16:08:41 +03:00
Charles
f30869001a Exposing SSL-only version of Postgres Source (#6362) 2021-09-27 16:46:39 -07:00
Michel Tricot
1773e41e47 Shorten our headers + adds contributors file (#6478) 2021-09-27 10:45:50 -07:00
LiRen Tu
548a3a3063 Format code (#6381) 2021-09-22 09:30:14 -07:00
Subodh Kant Chaturvedi
7591324351 introduce jvm flag MaxRAMPercentage for java connectors (#6001)
* introduce jvm flag MaxRAMPercentage for java connectors

* temporary commit to test this out on GKE via kube acceptance test

* undo temp commit
2021-09-22 19:59:39 +05:30
Oleksandr Sheheda
59cd5ca308 🎉 Source MSSQL: Added support for connection via SSH tunnels (#5966) (#6318)
* 🎉 Source MSSQL: Added support for connection via SSH tunnels (#5966)

* 🎉 Source MSSQL: Added support for connection via SSH tunnels (#5966)
updated image version

* 🎉 Source MSSQL: Added support for connection via SSH tunnels (#5966)
correction of remarks

* 🎉 Source MSSQL: Added support for connection via SSH tunnels (#5966)
bumb image version
2021-09-21 17:25:04 +03:00
Andrii Leonets
9dcced9517 Java sources: Rework JdbcUtils (#5786)
* move logic from static JdbcUtils to JdbcSourceOperations

* format

* Add methods for all types in order to have possibility rewrite them and use common type mapping.

* Make BigQuery in line impl with JDBC changes

* fix binary type

* add database creations methods with sourceOperations input

* Update airbyte-db/lib/src/main/java/io/airbyte/db/SourceOperations.java

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-09-08 17:13:41 +03:00
Subodh Kant Chaturvedi
a53dd7eaf0 remove sleep logic when the queue is full from CDC (#5600)
* dont sleep when queue is full

* bump version
2021-08-30 17:45:53 +05:30
Sherif A. Nada
86bdb7e16f rename comprehensive test to typetest and add javadocs (#5675) 2021-08-26 16:53:41 -07:00
LiRen Tu
b9e1997d2f Split airbyte-db and move db dev commands to gradle (#5616)
# Summary

- A follow-up PR for #5543.
- This PR separates the `airbyte-db` project to two modules:
  - `lib` is the original `airbyte-db`.
  - `jooq` is for jOOQ code generation.
- This is necessary because the jOOQ generator requires a custom database implementation that can run Flyway migration. So the code generator logic needs to depend on the compilation of the original `airbyte-db` project.

# Commits
* Separate db to lib and jooq modules
* Update dependencies
* Add jobs db migrator test
* Fix compose build
* Add migration dev center
* Add schema dump task
* Update airbyte-db/lib/README.md
  * Co-authored-by: Davin Chia <davinchia@gmail.com>
* Update readme
* Remove bom dependency
* Update readme
* Use jooq code in db config persistence
* Remove AirbyteConfigsTable

Co-authored-by: Davin Chia <davinchia@gmail.com>
2021-08-26 10:44:09 -07:00
LiRen Tu
825c35843a Fix documentation links (#5544) 2021-08-19 20:01:05 -07:00
Subodh Kant Chaturvedi
da67afe6ea Convert debezium transaction timestamps data type (#5356)
* Add transactionTimestamp field

* Update CDC_timestamp type in integrations and tests

* no jsonschema timestamp type, use string

* Linting

* format

* fix compilation error

* fix compilation error

* fix test output

* upgrade version for mssql,mysql,postgres

* stupid mistake! forgot to upgrade docker file

Co-authored-by: danieldiamond <danieldiamond1@gmail.com>
2021-08-13 19:45:54 +05:30
Dmytro
7baefadbf9 Validate oneOf JSON Schema rules as part of connector Acceptance Test (#5242)
* 3962: Add oneOf schema rules validation for acceptance test

* Add spec acceptance test for mssql and postgres connectors


Co-authored-by: Dmytro Rezchykov <dmitry.rezchykov@zazmic.com>
2021-08-13 14:58:24 +03:00
Subodh Kant Chaturvedi
771a364d31 bump up MSSQL version for cdc (#4694)
* first few classes for mssql cdc

* wip

* mssql cdc working against unit tests

* increment version

* add cdc acceptance test

* tweaks

* add file

* working on comprehensive tests

* change isolation from snapshot to read_committed_snapshot

* finalised type tests

* Revert "change isolation from snapshot to read_committed_snapshot"

This reverts commit 20c6768071.

* small docstring fix

* remove unused imports

* stress test fixes

* minor formatting improvements

* mssql cdc docs

* finish off cdc docs

* format fix

* update connector version

* add to changelog

* fix for sql server agent offline failing cdc enable on tables

* final structure

* few more updates

* undo unwanted changes

* add abstract test + more refinement

* remove CDC metadata to debezium

* use new cdc abstraction for mysql

* undo wanted change

* use cdc abstraction for postgres

* add files

* pull in latest changes

* ready

* rename class + add missing property

* use renamed class + move constants to MySqlSource

* use renamed class + move constants to PostgresSource

* move debezium to bases + upgrade debezium version + review comments

* downgrade version + minor fixes

* bring in latest changes from cdc abstraction

* reset to minutes

* bring in the latest changes

* format

* fix build

* address review comments

* bring in latest changes

* bring in latest changes

* use common abstraction for CDC via debezium for sql server

* remove debezium from build

* finalise PR

* should return Optional

* pull in latest changes

* pull in latest changes

* address review comments

* use common abstraction for CDC via debezium for mysql (#4604)

* use new cdc abstraction for mysql

* undo wanted change

* pull in latest changes

* use renamed class + move constants to MySqlSource

* bring in latest changes from cdc abstraction

* format

* bring in latest changes

* pull in latest changes

* use common abstraction for CDC via debezium for postgres (#4607)

* use cdc abstraction for postgres

* add files

* ready

* use renamed class + move constants to PostgresSource

* bring in the latest changes

* bring in latest changes

* pull in latest changes

* lower version for tests to run on CI

* bump up mssql version for cdc

* format

* Update docs/integrations/sources/mssql.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* addressing review comments

* fix for testGetTargetPosition

* format changes

Co-authored-by: George Claireaux <george@claireaux.co.uk>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-07-14 18:27:48 +01:00
Subodh Kant Chaturvedi
cc7b376044 🎉 Source MSSQL: implementation for CDC (#4689)
* first few classes for mssql cdc

* wip

* mssql cdc working against unit tests

* increment version

* add cdc acceptance test

* tweaks

* add file

* working on comprehensive tests

* change isolation from snapshot to read_committed_snapshot

* finalised type tests

* Revert "change isolation from snapshot to read_committed_snapshot"

This reverts commit 20c6768071.

* small docstring fix

* remove unused imports

* stress test fixes

* minor formatting improvements

* mssql cdc docs

* finish off cdc docs

* format fix

* update connector version

* add to changelog

* fix for sql server agent offline failing cdc enable on tables

* final structure

* few more updates

* undo unwanted changes

* add abstract test + more refinement

* remove CDC metadata to debezium

* use new cdc abstraction for mysql

* undo wanted change

* use cdc abstraction for postgres

* add files

* pull in latest changes

* ready

* rename class + add missing property

* use renamed class + move constants to MySqlSource

* use renamed class + move constants to PostgresSource

* move debezium to bases + upgrade debezium version + review comments

* downgrade version + minor fixes

* bring in latest changes from cdc abstraction

* reset to minutes

* bring in the latest changes

* format

* fix build

* address review comments

* bring in latest changes

* bring in latest changes

* use common abstraction for CDC via debezium for sql server

* remove debezium from build

* finalise PR

* should return Optional

* pull in latest changes

* pull in latest changes

* address review comments

* use common abstraction for CDC via debezium for mysql (#4604)

* use new cdc abstraction for mysql

* undo wanted change

* pull in latest changes

* use renamed class + move constants to MySqlSource

* bring in latest changes from cdc abstraction

* format

* bring in latest changes

* pull in latest changes

* use common abstraction for CDC via debezium for postgres (#4607)

* use cdc abstraction for postgres

* add files

* ready

* use renamed class + move constants to PostgresSource

* bring in the latest changes

* bring in latest changes

* pull in latest changes

* lower version for tests to run on CI

* format

* Update docs/integrations/sources/mssql.md

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>

* addressing review comments

* fix for testGetTargetPosition

* format changes

Co-authored-by: George Claireaux <george@claireaux.co.uk>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-07-14 17:15:55 +01:00
Andrii Leonets
107f5b8d61 🎉 Abstract level for SQL relational database sources (#4123)
Abstract level for SQL relational database sources
2021-07-05 17:18:07 +03:00
etsybaev
6868efeffb 🎉 Source MSSQL: Added new comprehensive data type tests (#4245)
* [3794] Added comprehensive tests for mssql source connector
2021-06-25 18:55:14 +03:00
Davin Chia
b04c080c95 Kube Queueing POC (#3464)
* Use CDK to generate source that can be configured to emit a certain number of records and always works.

* Checkpoint: socat works from inside the docker container.

* Override the entry point.

* Clean up and add ReadMe.

* Clean up socat.

* Checkpoint: connect to Kube cluster and list all the pods.

* Checkpoint: Sync worker pod is able to send output to the destination pod.

* Checkpoint: Sync worker creates Dest pod if none existed previously. It also waits for the pod to be ready before doing anything else. Sync worker will also remove the pod on termination.

* update readme

* Checkpoint: Dest pod does nott restart after finishing. Comment out delete command in Sync worker.

* working towards named pipes

* named pipes working

* update readme

* WIP named pipe / socat sidecar kube port forwarding (#3518)

* nearly working sources

* update

* stdin example

* move all kube testing yamls into the airbyte-workers directories. sort the airbyte-workers resource folder; place all the poc yamls together.

* Format.

* Put back the original KubeProcessBuilderFactory.

* Fix slight errors.

* Checkpoint: Worker pod knows its own IP. Successfully starts and writes to Dest pod after refactor.

* remove unused file and update readme

* Dest pod loops back into worker pod. However, the right messages do not seem to be passing in.

* Switch back to worker ip.

* SWEET VICTORY!.

* wrap kube pod in process (#3540)

also clean up kubernetes deploys.

* More clean up. (#3586)

The first 6 points of #3464.

The only interesting thing about this PR is the kube pod shutdown. For whatever reason, the OkHttpPool isn't respecting the evictAll call and 1 idle thread remains. So instead of shutting down immediately, the worker pod shuts down after 5 mins when the idle thread id reaped. There isn't an easy way to modify the pool's idle reap configuration now. I do not think this issue is blocking since it's relatively benign, so I vote we create a ticket and come back to this once we do an e2e test.

* Implements redirecting standard error as well. (#3623)

* Clean up before next implementation.

* kube process launching (#3790)

* processes must handle file mounting

* remove comment

* default to base entrypoint

* use process builder factory / select stdin / use a pool of ports

* fix up

* add super hacky copying example

* Checkpoint: Works end to end!

* Checkpoint: Use API to make sure init container is ready instead of blind sleep. Propagate exception in DefaultCheckConnectionWorker.

* Refactor KubePodProcess. Checked to make sure everything still works.

* Format.

* Clean up code. Begin putting this into variables and breaking up long constructor function.

* Add comments to explain what is happening.

* fix normalization test

* increase timeout for initcontainer

Co-authored-by: Davin Chia <davinchia@gmail.com>

* facepalm moment

* clean up kube poc pr (#3834)

* clean up

* remove source-always-works

* create separate commons-docker

* fix test

* enable kube e2e tests (#3866)

* enable kube e2e tests

* use more generally accepted env definition

* use new runners

* use its own runner and install minikube differently

* update name

* use kubectl alias

* use link instead of alias that doesn't propagate

* start minikube

* use driver=none

* go back to using action

* mess with versions

* revert runner

* install socat

* print logs after run

* also try re-runnining tasks

* always wait for file transfer

* use ports

* increase wait timeout for kube

* use different localhost ips and bump normalization to include an entrypoint

* proposed fix

* all working locally

* revert temporary changes

* revert normalization image change that's happening in a separate pr

* readability

* final comment

* Working Kube Cancel. (#3983)

* Port over the basic changes.

* Add logic to return proper exit code in the event of termination. Add comments to explain why.

* revert envs change and merge master to fix kube acceptance tests (#4012)

* use older env format

* fix build

Co-authored-by: jrhizor <me@jaredrhizor.com>
Co-authored-by: Jared Rhizor <jared@dataline.io>
2021-06-09 18:12:39 -07:00
Jared Rhizor
b4793b2510 add AIRBYTE_ENTRYPOINT for kubernetes support (#3973)
* add AIRBYTE_ENTRYPOINT for kubernetes support

* bump versions

* bump version in seed

* Update generic template

* keep scaffold sources at 0.1.0

* add missing newline

* handle python base versions correctly

* re-bump mysql and postgres sources

* re-bump snowflake destination

* add skip tests option

* switch to running tests

* reverse conditional to make it safer

* fix publish to include the test running

* fix iterable version

* fix file generation

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-06-09 13:01:45 -07:00
Daniel Dubinin
1a147e472a Source MSSQL: Enabled SSL connections (#3893)
* Source MSSQL: Enabled SSL connections
2021-06-08 15:05:15 +03:00
Andrii Leonets
213fae17a1 MySQL source: Add comprehensive data type test (#3810) 2021-06-07 14:01:02 +03:00
Charles
8983f09aea normalize connector acceptance test names (#3539)
* Rename standard tests to acceptance tests

* Normalize the names so that the nouns are always in the same order so it is easier to find tests
2021-05-22 13:40:40 -07:00
Davin Chia
42686add8a Release connectors with namespace change. (#2990)
Release all connectors affected by namespace change. Includes all JDBC sources and destinations.

Also add documentation for normalisation. Prerequisite to actually releasing 0.21.0-alpha.
2021-04-21 11:35:08 +08:00
Davin Chia
b9014acfca :tada Namespace support. Supported source-destination pairs will now sync data into the same namespace as the source. (#2862)
This PR introduces the following behavior for JDBC sources:
Instead of streamName = schema.tableName,  this is now streamName = tableName and namespace = schema. This means that, when replicating from these sources, data will be replicated into a form matching the source. e.g. public.users (postgres source) -> public.users (postgres destination) instead of current behaviour of public.public_users. Since MySQL does not have schemas, the MySQL source uses the database as it's namespace.

To do so:
- Make namespace a field class concept in Airbyte Protocol. This allows the source to propagate namespace and destinations to write to a source-defined namespace. Also sets us up for future namespace related configurability.
- Add an optional namespace field to the AirbyteRecordMessage. This field will be set by sources that support namespace.
- Introduce AirbyteStreamNameNamespacePair as a type-safe manner of identifying streams throughout our code base.
- Modify base_normalisation to better support source defined namespace, specifically allowing normalisation of tables with the same name to different schemas.
2021-04-17 15:33:22 +08:00
Davin Chia
e11ccfd0a1 Revert "Remove schema from stream name. (#2807)" (#2857)
This reverts commit 6e9d6fce59.
2021-04-12 14:56:11 -07:00
Davin Chia
6e9d6fce59 Remove schema from stream name. (#2807)
Last step (besides documentation) of namespace changes. This is a follow up to #2767 .

After this change, the following JDBC sources will change their behaviour to the behaviour described in the above document.

Namely, instead of streamName = schema.tableName, this will become streamName = tableName and namespace = schema. This means that, when replicating from these sources, data will be replicated into a form matching the source. e.g. public.users (postgres source) -> public.users (postgres destination) instead of current behaviour of public.public_users. Since MySQL does not have schemas, the MySQL source uses the database as it's namespace.

I cleaned up some bits of the CatalogHelpers. This affected the destinations, so I'm also running the destination tests.
2021-04-12 21:02:29 +08:00
Davin Chia
58062faccb Discover Schema sets Namespace field. (#2767)
This PR is step 5 of this tech spec - https://docs.google.com/document/d/1qFk4YqnwxE4MCGeJ9M2scGOYej6JnDy9A0zbICP_zjI/edit.

The first of (at least) 2 PRs to implement this on the source side. I made some headway before deciding to break the changes into one PR implementing this for discover schema job, and another PR implementing this for read. The combined PR would have been too big otherwise.

Also refactor MoreResources as the test method was attempting to write to the location classes where loaded out from - the issue is we cannot guarantee where the class is loaded from can be written to. Changing this to write to a random folder in the temp directory.
2021-04-07 11:53:03 +08:00
Davin Chia
e8190ff860 🎉 Add NCHAR and NVCHAR support to DB and cursor type casting. (#2600) 2021-03-29 08:09:06 +08:00
Christophe Duong
8a29584125 ☝🏼Destinations supports destination sync mode (#2460)
* Handle destination sync mode in destinations

* Source & Destination sync modes are required (#2500)

* Provide Migration script making sure it is always defined for previous sync configs
2021-03-26 20:23:48 +01:00
Christophe Duong
41e8b6a824 Source support primary keys (#2488)
* Source support primary keys
2021-03-17 19:28:56 +01:00
Christophe Duong
070575ffdf Protocol allows future / unknown properties (#2238)
* Allow new extra properties in validation
* Create migration script to upgrade all connectors versions
* Bumpversion of all connectors
2021-03-09 13:36:36 +01:00
Charles
aadfae24bd Iterator-based JDBC Source (and Redshift bugfix) (#1887) 2021-02-02 17:14:14 -08:00
Charles
f2f3b4ec37 Fix NPE in State Decorator (#1746) 2021-01-25 17:31:23 -08:00
Charles
6c5d1b2340 Assert Best Practices for JdbcDestinations (#1680) 2021-01-21 14:12:04 -08:00
Charles
3670545995 Fix JdbcSource handling of tables with same names in different schemas (#1724)
* Fix JdbcSource handling of tables with same names in different schemas

* Previously the JdbcSource was combining the columns of any tables with the same name across different schemas into a single stream in the catalog.

* This was caught because in those tables there were columns of the same name with different types which triggered a precondition to check for this.

* The fix makes sure we group by both schema name and table name.

* Adds test to the standard jdbc tests to catch this case.

* This test does NOT run for mysql as, mysql has no concept of schemas.
2021-01-19 18:45:53 -08:00
Charles
13c5eef93a Fix JdbcSource Incremental OOM (#1655) 2021-01-14 14:33:44 -08:00
Sherif A. Nada
68ecf991d6 Handle invalid numeric values in JDBC source (#1588) 2021-01-13 13:31:53 -08:00
Sherif Nada
130445df26 format 2021-01-07 10:48:39 -08:00
Sherif A. Nada
cd08188d70 handle non standard types in jdbc sources (#1576) 2021-01-07 10:31:33 -08:00
Charles
8347a69c77 Add Incremental to AbstractJdbcSource (#1306)
* Add standard tests for sources that use the JdbcSource to guarantee that changes do not break any sources that rely on JdbcSource.

* Add JdbcStressTest to verify that we stream / chunk data properly (a.k.a can handle more data in any JdbcSource than fits in memory)

* Migrate MSSQL and Redshift to user the new base source
2020-12-18 14:17:56 -08:00
Sherif A. Nada
81feb80612 Fix boolean handling in mssql source (#1372) 2020-12-17 17:32:47 -08:00
Charles
bbf851fe27 upgrade test containers (#1308) 2020-12-15 18:15:55 -08:00