1
0
mirror of synced 2026-01-01 09:02:59 -05:00
Commit Graph

80 Commits

Author SHA1 Message Date
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
vitaliizazmic
0c7f06018b 🐛 Airbyte CDK: transforming Python log levels to Airbyte protocol log levels
* Airbyte CDK native logger #1279 - transforming Python log levels to Airbyte protocol log levels

* Airbyte CDK native logger #1279 - add test for level types transforming

* CDK standard logger #1279 - test for transform critical level to fatal
2021-10-22 17:14:01 +03:00
George Claireaux
d660661b64 add google sheets oauth flow to server + fix auth rootObject type in protocol (#7131)
* adding google sheets oauth flow to server

* fix oauth type in protocol yaml

* bump sheets version in definitions

* added GDrive scope

* update sheets to master changes

* update protocol incl. cdk

* protocol typing for oauth rootobject

* format
2021-10-21 18:28:50 +01:00
Charles
ba44f700b9 add final for params, local variables, and fields (#7084) 2021-10-15 16:41:04 -07:00
vitaliizazmic
d5c04991bc 🎉 CDK: use standard logger with custom handler
* CDK - using native logger with custom formatter

* CDK - using native logger(fix exception and add trace)

* CDK - using native logger in AirbyteEntrypoint

* CDK - CHANGELOG.md

* CDK - remove unnecessary imports

* CDK - fixing according to PR review

* CDK native logger #1279 - annotations

* CDK native logger #1279 - fixing according to PR review

* CDK standard logger #1279 - tests

* CDK standard logger #1279 - reformat

* Airbyte CDK #1279 - improve docstrings

* Airbyte CDK #1279 - improve log levels

* Airbyte CDK #1279 - fix init get source name

* Airbyte CDK #1279 - update test licence

* Airbyte CDK #1279 - bump version
2021-10-12 20:56:56 +03:00
Christophe Duong
960214a48a Change Airbyte Protocol for OAuth and Make protocol more permissive (#6542) 2021-09-29 16:27:10 +02:00
Michel Tricot
f25542a145 🎉 Update license for Core (#6479) 2021-09-27 11:17:17 -07:00
Michel Tricot
1773e41e47 Shorten our headers + adds contributors file (#6478) 2021-09-27 10:45:50 -07:00
Sherif A. Nada
89dccf3897 Modify oauthSpecification to allow working with oneOfs (#6456) 2021-09-27 18:00:36 +02:00
Baz
9c05308d1f 🐛 Source Shopify: Fixed line_items/discount allocations & duties parts of orders schema (#5801)
* edited orders schema
* added changelog
* formated

Co-authored-by: Oleksandr Bazarnov <oleksandr.bazarnov@globallogic.com>
2021-09-02 13:58:47 +03:00
Sherif A. Nada
75a6a75b43 [protocol] add oauth params to connector specification (#5776) 2021-09-01 11:27:11 -07: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
Christophe Duong
7c26305865 Add supportsDBT and supportsNormalization to API objects (#4031)
* Add supportsDBT and supportsNormalization to API objects
2021-06-11 10:11:42 +02:00
Andrii Leonets
213fae17a1 MySQL source: Add comprehensive data type test (#3810) 2021-06-07 14:01:02 +03:00
Subodh Kant Chaturvedi
6adad7d98e destination-specification: add supportsNormalization and supportsDBT attributes (#3779)
* destination-specification: add supportsNormalization and supportsDBT attributes

* address review comment

* missed this one

* output after gradle format
2021-06-01 17:40:28 +05:30
Subodh Kant Chaturvedi
601ea5eed7 destination: add implementation for mysql as destination (#3242)
* destination: add implementation for mysql as destination

* Fix formatting errors.

* address review comments + fix flaky test

* fix formatting

* address Davin's review comments

* add missing todo

* enable namespace test + only provide test user the minimum permissions required

Co-authored-by: Davin Chia <davinchia@gmail.com>
2021-05-07 11:44:58 +05:30
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
9f16651840 Add Namespace Field. (#2704)
Add namespace field to the Airbyte Stream in preparation to propagate a source defined namespace to the Destination.

This namespace field is then consumed as the destination schema the table is written to.

This only applies to JDBC destinations.

This is Steps 1 - 4 of the namespace tech spec, seen at https://docs.google.com/document/d/1qFk4YqnwxE4MCGeJ9M2scGOYej6JnDy9A0zbICP_zjI/edit.

Some minor refactoring and commenting as I go.
* Remove unnecessary test classes as they match Integration tests in terms of what is being tested. They have no real value since the corresponding integration test can be run locally without additional credentials. The main value the classes brings is letting us run tests without building the docker image (the integration tests require doing so). however I feel this benefit is not worth the additional maintenance cost.
* Centralise DataArgumentProvider into it's own class for easier maintenance and usability.
2021-04-06 11:50:47 +08:00
Christophe Duong
6c6ea54bb8 Add SupportedDestinationSyncModes to destination specs objects (#2668)
* Add SupportedDestinationSyncModes to destination specs objects

* Bumpversions of destination connectors
2021-03-31 15:20:01 +02: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
Jared Rhizor
0530f85e54 separate the retrieval of incremental and full refresh streams in the jdbc abstract source (#2582)
* separate full refresh and incremental iterator creation

* fix underspecified test

* fmt

* fmt

* respond to nit and fix test
2021-03-24 08:14:22 -07:00
Christophe Duong
b1e911e255 Back-end support destination sync modes #2370 (#2375)
* Add new fields for destination_sync_modes
2021-03-10 20:01:12 +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
9a81bd6e5c MeiliSearch Destination (#1964) 2021-02-08 18:44:55 -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