1
0
mirror of synced 2026-01-01 18:02:53 -05:00
Commit Graph

107 Commits

Author SHA1 Message Date
Evan Tahler
e6b06a88ac AirbyteEstimateTraceMessage (#18875)
* `AirbyteEstimateTraceMessage`

* Add PR number

* fix method name

* Lint

* Lint

* fix merge

* Update docs/understanding-airbyte/airbyte-protocol.md

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

* `EstimateType` sub type in python

* lint

Co-authored-by: Davin Chia <davinchia@gmail.com>
2022-11-07 12:45:39 -08:00
Cole Snodgrass
9231e3ea35 removed unused code (#18788)
* removed unused code

* reformat with proper line length
2022-11-03 10:32:08 -07:00
Evan Tahler
02459e8354 Protocol Change: AirbyteControlMessage.ConnectorConfig (#17907)
* Protocol Change: AirbyteConfigMessage

* update PR link in docs

* Lint

* Update python files

* Update docs/understanding-airbyte/airbyte-protocol.md

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

* Update docs/understanding-airbyte/airbyte-protocol.md

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

* `AirbyteConfigMessage` -> `AirbyteConnectorConfigMessage`

* AirbyteOrchestratorMessage

* Update docs

* `AirbyteControlConnectorConfigMessage`

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2022-10-28 11:11:31 -07:00
Edward Gao
aea4c5392c Protocol change: Define a set of well-known data types (#17486)
* add WellKnownTypes.yaml

* rename to snakecase + put in airbyte-protocol

* add examples

* more descriptoins

* descriptions, more restrictions, better regex

* update documentation

* explicitly call out BC support
2022-10-27 14:04:15 -07:00
Augustin
b564f3eb78 Protocol: make supported_sync_modes a required not empty list on AirbyteStream (#15591) 2022-10-19 15:22:25 +02:00
Liren Tu
888347a0d0 🎉 JDBC sources: store cursor record count in db state (#15535)
* Add cursor_record_count to db stream state

* Add cursor record count to cursor info

* Emit max cursor record count

* Add original cursor record count

* Unify logging format

* Add backward compatible methods

* Update unit tests for state decorating iterator

* Update test (not done yet)

* Fix one more unit test

* Change where clause operator according to record count

* Add branch for null cursor

* Skip saving record count when it is 0

* Fix log wording

* Set mock record count in test

* Check cursor value instead of cursor info

* Fix source jdbc test

* Read record count from state

* Fix tests

* Add an acceptance test case

* Fix npe

* Change record count from int to long to avoid type conversion

* Fix references

* Fix oracle container

* Use uppercase for snowflake

* Use uppercase for db2

* Fix and use uppercase

* Update test case to include the edge case

* Format code

* Remove extra assertion in clickhouse

* Merge ms sql incremental query method

* Log query for debugging

* Clean up name_and_timestamp table

* Fix db2 tests

* Fix mssql tests

* Fix oracle tests

* Fix oracle tests

* Fix cockroachdb tests

* Fix snowflake tests

* Add changelog

* Fix mssql tests

* Fix db2-strict-encrypt tests

* Fix oracle-strict-encrypt tests

* Bump postgres version

* Fix oracle-strict-encrypt tests

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-14 01:09:12 -07:00
Anne
ca2605db95 Add breakingChange to catalogDiff (#17588)
* Add breaking field to FieldTransform on catalogDiff
2022-10-10 18:04:34 -07:00
Jimmy Ma
bded0ac7c0 Add an explicit v0 version of the protocol (#16797) 2022-09-21 16:31:05 -07:00
Benoit Moriceau
a0772b58d0 Bmoric/fix diff (#16513)
* Add test on the catalog diff logic

* Simplify test case

* Fix the bug

* Rm useless val

* Format

* Update test input

* revert map change

* Add test

* Fix test

* Format

* Use sugar

* Fix PMD errors

Co-authored-by: Malik Diarra <malik@airbyte.io>
2022-09-13 10:17:31 -07:00
Evan Tahler
dcfcb75d0f AirbyteLogMessage.stack_trace for logging messages with related (non-fatal) errors (#16479)
* Test log message from faker

* AirbyteLogMessage gains stack_trace

* Fixup spacing

* bump python protocol

* fixup additionalProperties in faker spec

* bump faker version

* update docs

* use lineSeparator vs \r\n

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-12 16:01:57 -07:00
Evan Tahler
8cf60e4ea9 Add changelog for Airbyte Protocol (#16560)
* Add changelog for Airbyte Protocol

* we are on v0.3.0 now
2022-09-12 10:30:01 -07:00
Anne
d856731029 Implement more Error Prone PMD rules (#15491)
* AvoidFieldNameMatchingTypeName rule
* AvoidInstanceofChecksInCatchClause
* compareObjectsWithEquals
* DoNotTerminateVM and ConstructorCallsOverridableMethod
* EmptyIfStmt and EmptyStatementNotInLoop
* ImplicitSwitchFallThrough, InvalidLogMessageFormat, and MoreThanOneLogger
2022-09-07 13:20:32 -07:00
Jimmy Ma
4fbe03bebe Add explicit tracking of Airbyte Protocol Version in ConnectorSpecification (#15340)
* Add Version to AirbyteMessage

* Move protocol version to ConnectorSpecification

* Add cdk generated protocol model

* Add protocol_version to the sample ConnectorSpec in the docs

* Update airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml

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

* update doc

* Update CDK changelog

* Update CDK protocol model

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2022-08-29 14:46:56 -07:00
Anne
e9afa9bef3 Error Prone PMD rules (#15010)
* Implement ErrorProne PMD rules:
AssignmentInOperand
AvoidAccessibilityAlteration
AvoidBranchingStatementAsLastInLoop
AvoidCatchingNPE
AvoidCatchingThrowable
AvoidDuplicateLiterals rule
2022-08-09 15:30:48 -07:00
Evan Tahler
d449fb6067 All objects in the Airbyte Proticol have additionalProperties: true (#15081)
* All objects in the Airbyte Proticol have `additionalProperties: true`

* order of keys

* rebuild airbyte proticol for python CDK
2022-07-27 18:03:13 -07:00
Edward Gao
b2dd470d3d Handle ints and longs in normalization (#14362)
* generate airbyte_type:integer

* normalization accepts `airbyte_type: integer`

* handles ints+longs

* update avro for consistency

* delete long type for now, treat all ints as longs

* update avro type mappings

{type:number, airbyte_type:integer} -> long
{type:number, airbyte_type:big_integer} -> string (i.e. "unbounded integer")

* fix test

* remove long handling

* Revert "remove long handling"

This reverts commit 33ade8d2831e675c3545ac6019d200ec312e54d9.

* Revert "update avro type mappings"

This reverts commit 5b0349badad7545efe8e1191291a628445fe1c84.

* Revert "delete long type for now, treat all ints as longs"

This reverts commit 018efd4a5d0c59f392fd8e3b0d0967c666b72947.

* Revert "update avro for consistency"

This reverts commit bcf47c6799b5906deb4f219d7f6e64ea73b41b74.

* newline@eof

* update test

* slightly better local tests

* fix test

* missed a few cases

* postgres tests use correct hostnames

* fix normalization

* fix int macro

* add test case

* normalization test output

* handle int/long correctly

* fix types for other DBs

* uint32 -> bigint; tests

* add type value assertions

* more test updates

* regenerate output

* reconcile big_integer to match docs

* update comment

* fix type

* fix mysql constructor call

* bigint only has 38 digits

* fix s3 ints, fix DAT test case

* big_integer should be string

* reduce to 28 digit big_ints

* fix test setup, mysql

* kill big_integer tests

* regenerate output

* version bumps

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-07-26 16:40:14 -07:00
Benoit Moriceau
5733f100d7 Validate only on incremental (#14966)
* Validate only on incremental

* Add test

* Format and pmd

* Update test

* PR comments

* Update airbyte-protocol/protocol-models/src/test/java/io/airbyte/protocol/models/CatalogHelpersTest.java

Co-authored-by: Lake Mossman <lake@airbyte.io>

* Fix test

Co-authored-by: Lake Mossman <lake@airbyte.io>
2022-07-22 16:01:56 -07:00
terencecho
a064d4b590 Fix formatting (#14968) 2022-07-22 13:26:36 -07:00
jackie-numerade
e838cd6822 [#14909] Fix for duplicate key isue when diffing catalogs with arrays (#14922) 2022-07-22 12:03:51 -07:00
Anne
e698710118 Apply Best Practices PMD rules (#14753)
* Apply Unused* Best Practices PMD rules
2022-07-15 15:01:04 -07:00
VitaliiMaltsev
d3f4fdd8fc BigQuery Denormalized "airbyte_type": "big_integer" to INT64 (#14079)
* BigQuery Denormalized "airbyte_type": "big_integer" to INT64

* updated changelog

* added unit test

* removed star import

* fixed checkstyle

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-29 19:47:15 +03:00
Charles
96d021ccbf add state type endpoint (#14111) 2022-06-27 22:40:21 -07:00
Charles
4c6d518154 fix stream name in stream transformation update (#14044) 2022-06-24 07:43:30 -07:00
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
Charles
2378b87157 add streams to reset to job info (#13919) 2022-06-22 10:52:54 -07:00
Charles
bbb340f9f1 add catalog diff connection read (#13918) 2022-06-22 08:57:36 -07:00
Charles
1e314747aa scaffold for catalog diff, needs fixing on type handling and tests (#13786) 2022-06-22 07:59:28 -07:00
Charles
22b727c0ea Update Airbyte Protocol Docs (#13709) 2022-06-14 15:04:38 -07:00
Benoit Moriceau
704dd8b534 Update schema (#13573)
* Update schema

* generate python

* Stream as an object

* PR comments

* generate python

* rm unused required

* Description the state with no type

* Fix connector build

* Format

* format

Co-authored-by: cgardens <charles@airbyte.io>
2022-06-10 16:35:59 -07:00
Benoit Moriceau
5a7b1aaacd Bmoric/add namespace to protocol (#13356)
* Add namespace

* Matching python update

* Pr comments

* regenerate and format python cdk

* format

Co-authored-by: Pedro Lopez <pedroslopez@me.com>
2022-06-06 15:41:56 -07:00
Davin Chia
7788594e22 Start publishing proper artifacts. (#13484)
## What
Finale of https://github.com/airbytehq/airbyte/pull/13122.

We've renamed all directories in previous PRs. Here we remove the fat jar configuration and add publishing to all subprojects.

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 https://github.com/gradle/gradle/issues/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.

## How
* Remove fat jar configuration.
* Add publishing to all subprojects.
2022-06-06 17:15:25 +08: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
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07:00
Benoit Moriceau
b3373b9742 Update state message (#12586)
What
Update the airbyte state message to support the per stream state.

The state message still contains the old way of storing the state in the data fields. It introduce 2 new fields to represent the global and the per stream state.
2022-05-12 09:00:11 -07:00
Yurii Bidiuk
b3194b2200 🎉🐛: Source mongoDB: implement building JsonSchema with 'properties' for fields with type 'object' (#12428)
* mongodb: build JsonSchema with 'properties'

* add tests

* bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-05-05 12:56:07 +03:00
Pedro S. Lopez
3c1eab3e27 generate AirbyeTraceMessage.type enum with descriptive class name (#12581)
* generate AirbyeTraceMessage `type` enum with descriptive class name

* add comment on `title` usage

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

* apply changes to bases/airbyte-protocol

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2022-05-04 18:48:34 -04:00
Anne
21c13644ad Add AirbyteTraceMessage to Airbyte protocol (#12458)
* Add AirbyteTraceMessage to protocol
Co-authored-by: Lake Mossman <lake@airbyte.io>
2022-05-03 14:11:50 -07:00
LiRen Tu
18f59bfc9a Add object methods for json schema type (#12493) 2022-04-29 23:45:42 -07:00
Charles
c1c8675366 Add readmes to all modules (#8893) 2022-03-13 14:45:36 -07:00
Christian Persson
124a3c6cb9 Fixes a typo in airbyte_protocol.yaml (#10970) 2022-03-09 09:12:38 -03: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
LiRen Tu
2f41810cca Verify source redshift schema selection in tests (#9862)
* Verify catalog in redshift source acceptance test

* Dry code

* Fix tests
2022-01-28 11:37:44 -08:00
ajzo90
678cfbe2cf Remove incorrect description for record in protocol.yaml (#9307)
Co-authored-by: Christian <christian@infobaleen.com>
2022-01-06 19:46:51 -03:00
mkhokh-33
5032addf3e 🐛 Source MySQL: transform binary data base64 format (#8047)
* Source-MySql: transform binary data base64 format, add integration tests

* Source-MySql: fix code style

* Source-MySql: bump versions

* Source-MySql: bump versions in source_specs.yaml

* Source-MySql: added test for stream with binary data for DestinationAbstractTest

* Source-MySql: added format
2021-11-23 16:04:48 +02:00
Christophe Duong
cdb476ecad Add auth config to oauth api (#7798)
* Change OAuth API

* Change protocol for new OAuth Spec (#7827)

* Add examples

* Add protocol object to api too

Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
2021-11-15 12:56:48 +01:00
VitaliiMaltsev
63c6249215 Revert "🎉 Extend logic for JDBC connectors to provide additional properties in JSON schema (#7859)" (#7969)
This reverts commit 2fe927b826.
2021-11-15 11:37:11 +02:00
VitaliiMaltsev
2fe927b826 🎉 Extend logic for JDBC connectors to provide additional properties in JSON schema (#7859)
* add date-time formats to json schema creation

* add jsonSchemaMap to enum

* fix tests and checkstyle

* remove python changes from PR

* remove star import

* Rename String_timestamp to String_Datetime

* Rename String_timestamp to String_Datetime

* fix checkstyle

* fix jdbc source tests

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
2021-11-13 22:56:58 +02:00
lmossman
b94ee00fd8 Revert "Generate seed connector specs on build (#7501)"
This reverts commit a534bb2a8f.
2021-11-03 08:46:43 -07:00
Lake Mossman
a534bb2a8f Generate seed connector specs on build (#7501)
* add specs module with logic to fetch specs on build

* format + build and add gradle dependency for new script

* check seed file for existing specs + refactor

* add tests + a bit more refactoring

* run gw format

* update yaml config persistence to merge specs into definitions

* add comment

* delete secrets migration to be consistent with master

* add dep

* add tests for GcsBucketSpecFetcher

* get rid of static block + format

* DRY up parse call

* add GCS details to comment

* formatting + fix test

* update comment

* do not format seed specs files

* change signature of run to allow cloud to reuse this script

* run gw format

* revert commits that change signature of run

* fix comment typo

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

* rename enum to be distinct from the enum in cloud

* add missing dependencies between modules

* add readme for seed connector spec generator

* reword

* reference readme in comment

* ignore 'spec' field in newFields logic

Co-authored-by: Davin Chia <davinchia@gmail.com>
2021-11-02 22:03:50 -07:00