1
0
mirror of synced 2026-01-05 21:02:13 -05:00
Commit Graph

347 Commits

Author SHA1 Message Date
Jonathan Pearlin
703ea070d7 Use StateMessageHelper in source (#14125)
* Use StateMessageHelper in source

* PR feedback and formatting

* More PR feedback

* Revert change

* Revert changes
2022-06-24 15:16:50 -04:00
Jonathan Pearlin
969521215e Release source connectors (#14077)
* Release source connectors

* Fix issue with database connection in test

* Fix failing tests due to authentication

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-23 14:33:22 -04:00
Subodh Kant Chaturvedi
62cf441827 improve cdc check for connectors (#14005)
* improve should use cdc check

* Revert "improve should use cdc check"

This reverts commit 7d01727279.

* improve should use cdc check

* add unit test
2022-06-23 14:22:51 +05:30
Lake Mossman
c6d83b3239 Fix per stream state protocol backward compatibility (#14032)
* rename state type field to fix backwards compatibility issue

* replace usages of stateType with type
2022-06-22 17:42:02 -07:00
Lake Mossman
cb90d7be0c Revert "Prepare release of JDBC connectors (#13987)" (#14029)
This reverts commit df759b3077.
2022-06-22 13:45:46 -07:00
Yevhen Sukhomud
52d6e8d95e 13535 Fixed bastion network for integration tests (#14007) 2022-06-22 22:17:19 +07:00
Jonathan Pearlin
df759b3077 Prepare release of JDBC connectors (#13987)
* Prepare release of JDBC connectors

* Update source definitions manually
2022-06-22 10:59:56 -04:00
Subodh Kant Chaturvedi
7cd02b0544 skip debezium engine startup in case no table is in INCREMENTAL mode (#13870) 2022-06-22 13:57:44 +05:30
Jonathan Pearlin
6ca4017d28 Per-stream state support for Postgres source (#13609)
* WIP Per-stream state support for Postgres source

* Fix failing test

* Improve code coverage

* Make global the default state manager

* Add legacy adapter state manager

* Formatting

* Include legacy state for backwards compatibility

* Add global state manager

* Implement Global/CDC state handling

* Fix test issues

* Fix issue with updated method signature

* Handle empty state case in global state manager

* Adjust to protocol changes

* Fix failing acceptance tests

* Fix failing test

* Fix unmodifiable list issue

* Fix unmodifiable exception

* PR feedback

* Abstract global state manager selection

* Handle conversion between different state types

* Handle invalid conversion

* Rename parameter

* Refactor state manager creation

* Fix failing tests

* Fix failing integration tests

* Add CDC test

* Fix failing integration test

* Revert change

* Fix failing integration test

* Use per-stream for postgres tests

* Formatting

* Correct stream descriptor validation

* Correct permalink

* PR feedback
2022-06-21 15:35:40 -04:00
George Claireaux
c5783aa799 connectors that published (#13932) 2022-06-20 12:42:56 +01:00
Yevhen Sukhomud
174f15d0c0 13546 Fix integration tests source-postgres Mac OS (#13872)
* 13546 Fix integration tests source-postgres Mac OS
2022-06-20 15:09:01 +07:00
LiRen Tu
26f462327b 🎉 Postgres source: prepare for removing strict-encrypt variant (#13823)
* Bump postgres version

* Update doc

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-15 18:44:53 -07:00
LiRen Tu
973f0b1165 Make connector adaptable based on deployment mode (#13522)
* Add deployment mode to env shared with jobs

* Add adaptive runners

* Migrate postgres source to use adaptive runner

* Add an array of specs in docker image spec definition

* Add copyright

* Parse docker image spec with specs list

* Update spec yaml files

* Pass in DEPLOYMENT_MODE to docker compose file

* Revert "Parse docker image spec with specs list"

This reverts commit 8fe41dd3b7.

* Revert changes in docker image spec

* Read cloud specific spec files based on deployment mode

* Revert "Update spec yaml files"

This reverts commit 059f326432.

* Publish cloud spec file if necessary

* Fix upload script

* Move test files

* Update docker compose file

* Format code

* Add comment about spec filename

* Add unit tests

* Remove redundant jdbc acceptance test

When running `PostgresStrictEncryptJdbcSourceAcceptanceTest`, the `discover` method tests always fail because there are unexpected columns in the catalog:
- `wakeup_at`
- `last_visited_at`
- `last_comment_at`

These columns only exist in `PostgresJdbcSourceAcceptanceTest`. And this failure cannot be reproduced locally.

The hypothesis is that when the JDBC unit tests are run on CI, they are run in parallel, and the same testcontainer is used for both tests. That's why the strict encrypt test can discover columns from the oridinary unit test.

Given that the JDBC strict encrypt test is basically redundant, it is removed.
2022-06-15 08:23:54 -07:00
Subodh Kant Chaturvedi
1ab08e5be2 upgrade debezium version for postgres to 1.9.2 (#13368)
* upgrade debezium version for postgres to 1.9.2

* fix test+build

* fix build

* address review comments

* update link to docs

* fix test
2022-06-15 16:17:36 +05:30
VitaliiMaltsev
f5a6a28211 🐛 Postgres Source: fixed truncated precision if the value of the milliseconds or seconds is 0 (#13549)
* Postgres Source: fixed truncated precision if the value of the millisecond or second is 0

* check CI with 1.15.3 testcontainer

* check CI with 1.15.3 testcontainer

* returned latest version of testcontainer

* fixed checkstyle

* fixed checkstyle

* returned latest testcontainer version

* updated CHANGELOG

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-14 23:39:01 +03:00
Greg Solovyev
2cd62002be Fallback to parsing datetime and time strings w/ and w/o timezones in case DateTimeParseException is thrown (#13745)
* Fall back to parsing w/ or w/o TZ if parsing a date or a time string fails
* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-13 23:28:46 -07:00
VitaliiMaltsev
a3ca3ab6b2 🐛 Postgres Source: fixed unsupported date-time datatypes during incremental sync (#13655)
* Postgres Source: fixed unsupposted date-time datatypes during incremental sync

* updated CHANGELOG

* add tests for incremental cursor check

* removed star import

* Postgres Source: fixed unsupposted date-time datatypes during incremental sync

* updated CHANGELOG

* add tests for incremental cursor check

* removed star import

* add timestamp datatype test

* Bump version in Dockerfile

* auto-bump connector version

Co-authored-by: grishick <greg@airbyte.io>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-13 13:58:26 -07:00
Jonathan Pearlin
2b31011bce Separate platform and connector testcontainer versions (#13642)
* Separate platform and connector testcontainer versions

* Fix dependency

* Fix dependency

* Fix dependency usage

* Prevent leaking testcontainer dependencies
2022-06-10 09:34:31 -04:00
LiRen Tu
545a7a3eb6 🎉 JDBC source: adjust fetch size based on max memory and max row size (#13435)
* Switch to measure max row byte size

* Reduce fetch size change logs

* Update unit tests

* Determine jdbc buffer size based on max memory

* Bump postgres version

* Bump postgres version

* Bump mysql version

* Bump mssql version

* Format java code

* Increase hikari connection timeout

* Update data source default parameters

* auto-bump connector version

* Mark postgres 0.4.21 as not published

* Revert "Bump mysql version"

This reverts commit ad9135258c.

* Fix unit test

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-07 14:29:34 -07:00
Eugene
851885aebb fixed checkstyle errors (#13562) 2022-06-07 20:10:37 +03:00
Yurii Bidiuk
4b266c1b7d 🐛 Source Postgres: write hstore as json (#13367)
* src-postgres: write hstore as json

* fix PR remarks

* bump version

* fix PR comments

* add text blocks
2022-06-06 22:25:29 +03:00
Davin Chia
83a89aa843 Fat Jar: Rename Dir Part 1 (#13476)
Part 1 of #13122.

Rename airbyte-db:lib to airbyte-db:db-lib.
Rename airbyte-metrics:lib to airbyte-metrics:metrics-lib
Rename airbyte-protocol:models to airbyte-protocol:protocol-models.

Explanation for what is happening:

Identically named subprojects have the following issues:
- publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
- deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
- the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See Projects with same name lead to unintended conflict resolution gradle/gradle#847 for more info.
- given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.
2022-06-06 00:35:43 +08:00
VitaliiMaltsev
0a56b1d43f Postgres Source: add timezone awareness and handle BC dates (#13166)
* Postgres Source: add timezone awareness and handle BC dates

* fixed checkstyle

* add tests

* updated changelog

* removed star import

* fixed tests

* refactoring

* removed star import

* fixed bytea type

* created final static constants

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-01 10:46:39 +03:00
Yurii Bidiuk
16de42fde3 🎉Source Postgres (CDC) - add support of tsquery type (#13083)
* cdc - add support of tsquery type

* rebase on master

* Add changes made by the build

* Update version in Dockerfile

* auto-bump connector version

Co-authored-by: grishick <greg@airbyte.io>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-28 22:03:59 -07:00
Yurii Bidiuk
fed651ba7c Source Posgres: [CDC] allow null values for columns (#13016)
* [cdc] source postgres: add optional to schema fields

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-27 13:45:18 -07:00
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07:00
Topher Lubaway
013a886f4f Fixes Spotless and runs spotless (#13040)
zipped files with JSON extension made this task sad
2022-05-20 07:26:55 -05:00
Eugene
c85e131d92 🎉Source-postgres: added custom JDBC parameters (jdbc_url_params) field (#12840)
* [10729] source-postgres: added custom JDBC parameters field
2022-05-17 15:51:13 +03:00
Jonathan Pearlin
fdaf335279 Better database connection handling for connectors (#12743)
* Better database connection handling for connectors

* Log connection error

* Properly close connection

* Remove unused method

* Close data source

* Use utility to close data source

* Use utility to close data source

* PR feedback

* Add Databricks driver

* Use driver class enum

* Use correct config

* Ensure config created before use

* Fix failing integration test

* Create DSLContext before use

* Address integration test failures

* Ensure DSLContext is closed

* Fix compile error

* Use correct datasource

* Use correct connection properties

* Close DSLContext

* Close DSLContext

* Fix integration test failures

* Properly close datasource

* Fix compilation issues

* Use existing database object

* Wrap close in try/finally

* Update test

* Wrap close in try/finally

* Ensure DSLContext is created

* Revert change to test

* Use correct data source

* Remove unused import

* More cleanup

* Add missing annotation

* Only initialize data source once

* Remove unused import

* Force testcontainers version

* Fix testcontainer issue

* Fix failing test

* Properly close all data sources

* Clear data sources after closing

* Fix compile error

* Fix compilation error

* Add missing method
2022-05-13 16:28:38 -04:00
LiRen Tu
7d16fdafa1 🐞 Postgres source: fix azure database catalog retrieval (#12834)
* Remove host in azure username

* Bump version

* Fix test

* Replace host with jdbc_url

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-13 01:35:00 -07:00
Jonathan Pearlin
ebb9f3e1ac Prepare Database Access Layer for Dependency Injection (#12546)
* Prepare database access objects for dependency injection

* Replace duplicate code

* Remove unused imports

* Remove redundant validation call

* Remove unused imports

* Use constants

* Disable fast fail during connection pool initialization

* Remove typo

* Add missing test dependency

* Add missing test dependency

* Add missing test dependency

* Fix issue caused by rebase

* Add method for cloud

* Autoclose DSL context during migration

* Better connection close handling

* Fix typo in dependency

* Fix SpotBugs issue

* React to rebase

* Fix typo

* Update JavaDoc

* Fix database close calls

* Pass configs to getServer

* Fix typo

* Fix call to removed method

* Fix typo

* Use catalog to manage versions

* PR feedback

* Centralize shutdown hook

* Fix rebase issues

* Document test cases

* Document test cases

* Formatting

* Properly close database resources

* Rebase cleanup
2022-05-09 15:26:54 -04:00
LiRen Tu
3e6151a35a 🎉 Source postgres: publish fix of missing streams (#12689)
* Add logging

* Bump connector version

* Mute fb errors

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-08 21:06:06 -07:00
Jonathan Alvarado
c96f32f741 Use role-based permissions for source-postgres (#11938)
* Use role-based permissions for source-postgres

Modify permissions query to add recursive lookup of role-based
permissions. This solves problems users are having with not being able
to list tables for postgres souces

* Add unit test of discovery logic
2022-05-07 22:16:37 -07:00
oneshcheret
cc6e18320b Postgres source: skipping columns with nullable values (#11760)
* Postgres source: skipping nullable columns during

* Postgres source: handling null value

* Postgres source: bump versions

* Postgres source: revert bump versions in definition yaml

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-06 16:49:06 -07:00
LiRen Tu
e15ae56389 Close all unsafe queries (#12495)
* Add helper methods to return lists of json nodes

* Close all unsafe queries

* Add one more helper method

* Simplify helper names

* Format code
2022-05-03 13:45:02 -07:00
LiRen Tu
35f2aa9aed 🎉 Jdbc sources: publish new version with adaptive fetch size (#12480)
* Default scaffold to use adaptive streaming config

* Switch more connectors to use adaptive streaming config

* Bump version for cockroach db

* Bump version for db2

* Bump mssql version

* Bump mysql version

* Bump oracle version

* Bump postgres version

* Bump redshift version

* Bump snowflake version

* Bump tidb version

* auto-bump connector version

* Fix db2 findbug issue

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

* Fix more findbug issues

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

* Fix findbug issue for mysql-strict-encrypt

* Fix findbugs issue for oracle source

* auto-bump connector version

* Remove suppress warnings annotation

* Fix oracle encrypt tests

* Fix oracle encrypt acceptance test

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-04-29 23:14:58 -07:00
LiRen Tu
55a0db7c67 🎉 JDBC source: adjust streaming query fetch size dynamically (#12400)
* Merge all streaming configs to one

* Implement new streaming query config

* Format code

* Fix comparison

* Use double for mean byte size

* Update fetch size only when changed

* Calculate mean size by sampling n rows

* Add javadoc

* Change min fetch size to 1

* Add comment by buffer size

* Update java connector template

* Perform division first

* Add unit test for fetching large rows

* Format code

* Fix connector compilation error
2022-04-28 22:36:17 -07:00
Greg Solovyev
597d6ccbb8 Reconcile versions in git with versions in docker hub (#12368) 2022-04-26 11:41:59 -07:00
Marcos Marx
3113ef44a3 Bump Google Ads version and run format (#12087)
* combine all

working locally

missing fields in click view and keyqord_view

add date to campaigns

add fields to click_view

test

* configured_catalog campaigns

* rem keywordview

* conflicts

* string type

* remove network type

* change ad group id to integer

* fix tests

* bump connector version

* bump connector config doc vesion

* run format

Co-authored-by: Konrad <konrad@PB-Mac8.local>
Co-authored-by: schlattk <konrad@pensionbee.com>
2022-04-18 21:15:29 -03:00
Greg Solovyev
ead3356677 Use time zone that does not switch to DST (#11644)
* Use time zone that does not switch to DST

* Fix timezone tests
 - Use timezone MST, which is explicitly defined as 'standard time' and will not be affected by DST
2022-04-08 12:32:37 -07:00
Eugene
d84df02f26 🎉Source-postgres: fixed roles for fetching materialized view processing (#11798)
* [10389] source-postgres: fixed roles for fetching materialized view processing
2022-04-08 20:05:41 +03:00
LiRen Tu
e5ae3b3990 Rename jdbc db methods that require manual closure (#11300)
* Rename jdbc db methods to raise awareness of potential connection leak

* Format code
2022-03-21 15:00:10 -07:00
Davin Chia
5a575e42e0 Format connectors. (#11231) 2022-03-17 19:08:01 +08:00
Charles
5fde59fdbd add spotbugs (#10522) 2022-03-11 12:05:17 -08:00
Subodh Kant Chaturvedi
9a5a1e6420 update postgres source version (#10696)
* update postgres source version

* update spec
2022-03-01 19:28:26 +05:30
andriikorotkov
1d66672fad 🐛 Fixed cursor for old connectors that use non-microsecond format. Now connectors work with both formats (#10508)
* updated timestamp transformation with microseconds

* updated timestamp transformation with microseconds

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql tests

* removed extra logs

* fixed cursor for timestamp

* updated test

* updated type transformation

* updated type transformation

* updated type transformation

* updated tests

* updated oracle tests

* updated documentations and connectors versions

* updated documentations and connectors versions

* fix code style

* updated cursor for jdbc sources

* updated cursor for jdbc sources

* updated cursor for jdbc sources
2022-02-22 13:26:10 +02:00
andriikorotkov
9d401fc9f7 🎉 Updated timestamp transformation with microseconds (#10242)
* updated timestamp transformation with microseconds

* updated timestamp transformation with microseconds

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql datatype tests

* updated mysql tests

* removed extra logs

* fixed cursor for timestamp

* updated test

* updated type transformation

* updated type transformation

* updated type transformation

* updated tests

* updated oracle tests

* updated documentations and connectors versions

* updated documentations and connectors versions

* fix code style
2022-02-18 14:51:58 +02:00
Lake Mossman
3d8a0dc048 Add ExitOnOutOfMemoryError to java connectors and bump versions (#10256) 2022-02-14 15:49:15 -08:00
VitaliiMaltsev
e30d8348b2 Change JsonSchemaPrimitive to a class (#9913)
* fix for jdk 17

* add JsonSchemaType class

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix Oracle tests

* fix Redshift tests

* fix Redshift tests

* fix checkstyle

* fix MSSQL tests

* fix cockroachdb tests

* fix checkstyle

* fix checkstyle

* replace star imports

* replace star imports

* replace star imports

* update JsonSchemaType | fixed checkstyle

* Remove unused variables in test

* Fix imports

* Expand imports

* Fix more imports

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
Co-authored-by: Liren Tu <tuliren.git@outlook.com>
2022-02-14 02:12:37 -08:00
oneshcheret
84d1456fcf JDBC sources: update for sources that not have permissions issues (#10173)
* JDBC sources: update for sources that not have permissions issues

* Postgres, CockroachDB and DB2 sources: updated case when user has none permitted table

* Postgres, CockroachDB and DB2 sources: updated case when user has none permitted table

* Postgres, CockroachDB and DB2 sources: bump versions

* Postgres, CockroachDB and DB2 sources: bump source specs

* Postgres, CockroachDB and DB2 sources: revert changes for postgres-strict-encrypt
2022-02-09 19:23:23 +02:00