1
0
mirror of synced 2026-01-26 04:01:39 -05:00
Commit Graph

598 Commits

Author SHA1 Message Date
Anton Karpets
2cfa6ea2c8 File-based CDK: fix schemas merge for nullable object types (#37619) 2024-05-02 10:40:20 +03:00
Alexandre Girard
102d09cc9d Expose cdk version as airbyte_cdk.__version__ (#37680) 2024-04-30 10:18:00 -07:00
Alexandre Girard
86ee91ed5d Connector builder: read input state if it exists (#37495) 2024-04-24 15:53:09 -07:00
Ella Rohm-Ensing
e766ba3a9e Python CDK: remove "deprecated" package (#37497) 2024-04-23 13:23:05 -05:00
Maxime Carbonneau-Leclerc
48af92ad78 Concurrent CDK: if exception is AirbyteTracedException, raise this an… (#37443) 2024-04-19 20:32:46 +00:00
Patrick Nilan
b20cd1bd1d airbyte-cdk - Adds JwtAuthenticator to low-code (#37005) 2024-04-19 09:17:54 -07:00
Alexandre Girard
a2e908dc17 connector builder: Set state on stream slices (#37109) 2024-04-18 16:16:02 -07:00
Maxime Carbonneau-Leclerc
b49c5006ea Break Python application with status 1 on exception (#37390) 2024-04-18 16:54:55 -04:00
Maxime Carbonneau-Leclerc
d2c8e63ea5 Fix partitioned state saving issue (#37389) 2024-04-17 22:57:45 -04:00
Natik Gadzhi
33a5cf777b [Python CDK] Delete SingerSource (#37364) 2024-04-17 07:21:22 -07:00
Natik Gadzhi
e4c942e526 [python-cdk] README cleanup (#37306) 2024-04-16 14:57:11 -07:00
Bindi Pankhudi
63d4d5e3f6 Python CDK : Update LangChain version (#37327) 2024-04-15 12:43:51 -07:00
Maxime Carbonneau-Leclerc
a900c7841f Add StreamDescriptor as params of AirbyteTracedException.__init__ (#37108) 2024-04-12 17:11:12 -04:00
Brian Lai
822d76c725 [airbyte-cdk] add print parameter to flush the print buffer after each invocation (#37000) 2024-04-11 15:11:23 -04:00
Maxime Carbonneau-Leclerc
ab52ce5182 Concurrent CDK: add logging on exception (#36976) 2024-04-10 21:36:44 -04:00
Maxime Carbonneau-Leclerc
bbf69aea7f Concurrent CDK: support partitioned states (#36811) 2024-04-09 16:48:12 -04:00
Erick Corona
23c280b651 Fix empty internal_message empty when ExceptionWithDisplayMessage raised (#36901) 2024-04-09 08:15:15 -06:00
Christo Grabowski
e74d936350 CDK: updated error message for missing streams (#36833) 2024-04-04 15:39:40 -04:00
Serhii Lazebnyi
033decc8c2 add backward compatibility for an old close slice logic (#36774) 2024-04-03 03:13:22 +02:00
Alexandre Girard
7676892ca9 low-code: Fix cursor pagination instantiation if the stop_condition is a string (#36760) 2024-04-02 14:03:27 -07:00
Alexandre Girard
4af69fc20d low-code: Add last_page_size and last_record to pagination context (#36408) 2024-04-02 10:43:30 -07:00
Serhii Lazebnyi
604a2dfee8 fix wrong partition key definition after legacy state migration (#36719) 2024-04-01 17:08:03 +02:00
Alexandre Girard
b27ddfe19e connector-builder: return full url-encoded URL instead of separating parameters (#36680) 2024-03-28 18:49:35 -07:00
Serhii Lazebnyi
c3c87ea1a5 follow up to #36294: allow migrate sub stream state with custom partition router (#36590) 2024-03-28 23:39:26 +01:00
Brian Lai
624415d111 [airbyte-cdk] emit source recordCount as float instead of integer (#36560)
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
2024-03-27 16:02:30 -04:00
Ella Rohm-Ensing
3f91b64d53 check cdk: don't use connector test runenr (#36564) 2024-03-27 19:13:17 +00:00
Ella Rohm-Ensing
0c367680b0 Fix E721 errors in the CDK (#36490) 2024-03-26 18:05:33 +00:00
Alexandre Girard
118a864ea2 low-code: Add string filter (#36393)
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
2024-03-25 17:02:31 -07:00
Ella Rohm-Ensing
195408eb15 Airbyte CDK: move from gradle to poetry (#36250) 2024-03-25 18:46:57 -05:00
Alexandre Girard
28591c3481 per partition state and custom state migrations (#36294) 2024-03-25 16:05:55 -07:00
Roman Yermilov [GL]
242dd6a425 Airbyte CDK: request options allowed to be an array (#36357) 2024-03-22 07:07:44 +01:00
Brian Lai
728c92cba1 [airbyte-cdk] Stream should not extract state using legacy get_updated_state if no cursor (#36342) 2024-03-20 23:47:23 -04:00
Anatolii Yatsuk
157be91cb1 File-based CDK: Add skip_wrong_number_of_fields_error parameter for CSV parser (#36237)
Co-authored-by: Catherine Noll <clnoll@users.noreply.github.com>
2024-03-20 22:49:49 +02:00
Maxime Carbonneau-Leclerc
2f34f084e4 [ISSUE #6548] make all fields nullable except from pk and cursor field (#36201) 2024-03-20 09:48:38 -04:00
Alex Birdsall
44f784e200 Remove most_recent_record arg from Cursor.close_slice (#36216) 2024-03-18 18:28:50 -07:00
Artem Inzhyyants
240aa0180d Airbyte CDK (low code): add refresh_token_error handler to DeclarativeOauth2Authenticator (#36058)
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
2024-03-18 18:52:58 +01:00
Alexandre Girard
875e5dfacb low-code: Allow developers to use a custom schema loader (#36040) 2024-03-18 09:42:16 -07:00
Alex Birdsall
a6a1b3c0c3 Base datetime cursor state off latest observed record (#35843) 2024-03-15 15:06:43 -07:00
Alexandre Girard
5508719699 🐛 low-code: remove debug sleep (#36187) 2024-03-15 09:45:07 -07:00
Tobias Macey
f67938993e [airbyte-cdk] Fix tab delimiter configuration in CSV file type (#35901) 2024-03-13 13:46:32 -03:00
Alexandre Girard
15b954546f raise exception with the full class name if a class for a custom comp… (#35868) 2024-03-12 12:18:38 -07:00
Brian Lai
b1f3b8a36f [airbyte-cdk] entrypoint wrapper should use per-stream state not legacy format (#35976) 2024-03-11 19:09:08 -04:00
Ella Rohm-Ensing
2ac5248387 Emit record counts in state messages for concurrent streams (#35907)
Co-authored-by: brianjlai <brian.lai@airbyte.io>
Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com>
2024-03-08 19:08:59 -05:00
Ella Rohm-Ensing
acbdc2d6e1 Introduce FinalStateCursor to emit state messages at the end of full refresh syncs (#35905)
Co-authored-by: brianjlai <brian.lai@airbyte.io>
2024-03-08 16:58:26 -05:00
Alexandre Girard
4a808ee178 🐛 follow up to #35471: update the cartesian stream slicer (#35865) 2024-03-07 08:20:02 -08:00
Maxime Carbonneau-Leclerc
858e61d67a Declarative CDK: Fix None error on stream_slice (#35879) 2024-03-07 10:43:58 -05:00
Alexandre Girard
f55abc1fdc 🐛 low-code: Fix incremental substreams (#35471) 2024-03-05 18:50:42 -08:00
Alexandre Girard
5f48da9a67 [low-code] allow page size to be defined with string interpolation (#35735)
Co-authored-by: Dan Lecocq <dlecocq@sofi.org>
2024-03-05 16:03:16 -08:00
Ella Rohm-Ensing
a090088594 file cdk: handle scalar values that resolve to None (#35688)
<!--
Thanks for your contribution! 
Before you submit the pull request, 
I'd like to kindly remind you to take a moment and read through our guidelines
to ensure that your contribution aligns with the type of contributions our project accepts.
All the information you need can be found here:
   https://docs.airbyte.com/contributing-to-airbyte/

We truly appreciate your interest in contributing to Airbyte,
and we're excited to see what you have to offer! 

If you have any questions or need any assistance, feel free to reach out in #contributions Slack channel.
-->

## What
* Closes https://github.com/airbytehq/airbyte/issues/34151
* Closes https://github.com/airbytehq/oncall/issues/4386

## How
Handle cases where the python value of a pyarrow scalar is None. This can be due to null values in data, as well as null-like values like `NaT` (similar to `NaN`). We previously handled this for `None` binary types, but now handle this for `None` of any type.

## 🚨 User Impact 🚨
No breaking changes. After this CDK version is released we should update the CDK dependency in S3 and any other file sources that parse parquet


## Pre-merge Actions
*Expand the relevant checklist and delete the others.*

<details><summary><strong>New Connector</strong></summary>

### Community member or Airbyter

- **Community member?** Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run `./gradlew :airbyte-integrations:connectors:<name>:integrationTest`.
- Connector version is set to `0.0.1`
    - `Dockerfile` has version `0.0.1`
- Documentation updated
    - Connector's `README.md`
    - Connector's `bootstrap.md`. See [description and examples](https://docs.google.com/document/d/1ypdgmwmEHWv-TrO4_YOQ7pAJGVrMp5BOkEVh831N260/edit?usp=sharing)
    - `docs/integrations/<source or destination>/<name>.md` including changelog with an entry for the initial version. See changelog [example](https://docs.airbyte.io/integrations/sources/stripe#changelog)
    - `docs/integrations/README.md`

### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Updating a connector</strong></summary>

### Community member or Airbyter

- Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added


### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Connector Generator</strong></summary>

- Issue acceptance criteria met
- PR name follows [PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook)
- If adding a new generator, add it to the [list of scaffold modules being tested](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connector-templates/generator/build.gradle#L41)
- The generator test modules (all connectors with `-scaffold` in their name) have been updated with the latest scaffold by running `./gradlew :airbyte-integrations:connector-templates:generator:generateScaffolds` then checking in your changes
- Documentation which references the generator is updated as needed

</details>

<details><summary><strong>Updating the Python CDK</strong></summary>

### Airbyter

Before merging:
- Pull Request description explains what problem it is solving
- Code change is unit tested
- Build and my-py check pass
- Smoke test the change on at least one affected connector
   - On Github: Run [this workflow](https://github.com/airbytehq/airbyte/actions/workflows/connectors_tests.yml), passing `--use-local-cdk --name=source-<connector>` as options
   - Locally: `airbyte-ci connectors --use-local-cdk --name=source-<connector> test`
- PR is reviewed and approved
      
After merging:
- [Publish the CDK](https://github.com/airbytehq/airbyte/actions/workflows/publish-cdk-command-manually.yml)
   - The CDK does not follow proper semantic versioning. Choose minor if this the change has significant user impact or is a breaking change. Choose patch otherwise.
   - Write a thoughtful changelog message so we know what was updated.
- Merge the platform PR that was auto-created for updating the Connector Builder's CDK version
   - This step is optional if the change does not affect the connector builder or declarative connectors.

</details>
2024-03-05 09:07:02 -08:00
Ella Rohm-Ensing
08dd7de8f8 file cdk: fix typing, pull out non-scalar handling (#35687)
<!--
Thanks for your contribution! 
Before you submit the pull request, 
I'd like to kindly remind you to take a moment and read through our guidelines
to ensure that your contribution aligns with the type of contributions our project accepts.
All the information you need can be found here:
   https://docs.airbyte.com/contributing-to-airbyte/

We truly appreciate your interest in contributing to Airbyte,
and we're excited to see what you have to offer! 

If you have any questions or need any assistance, feel free to reach out in #contributions Slack channel.
-->

## What
* Fix typing and handling of different types in `_to_output_value` - we don't always get a `Scalar`. We already handle the different cases correctly, but the typing doesn't reflect this. 
* Splitting out the methods to do the scalar separately is a helpful precursor to https://github.com/airbytehq/airbyte/pull/35688, as the `DictionaryArray` object doesn't have an `as_py()` method.

## 🚨 User Impact 🚨
None

## Pre-merge Actions
*Expand the relevant checklist and delete the others.*

<details><summary><strong>New Connector</strong></summary>

### Community member or Airbyter

- **Community member?** Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run `./gradlew :airbyte-integrations:connectors:<name>:integrationTest`.
- Connector version is set to `0.0.1`
    - `Dockerfile` has version `0.0.1`
- Documentation updated
    - Connector's `README.md`
    - Connector's `bootstrap.md`. See [description and examples](https://docs.google.com/document/d/1ypdgmwmEHWv-TrO4_YOQ7pAJGVrMp5BOkEVh831N260/edit?usp=sharing)
    - `docs/integrations/<source or destination>/<name>.md` including changelog with an entry for the initial version. See changelog [example](https://docs.airbyte.io/integrations/sources/stripe#changelog)
    - `docs/integrations/README.md`

### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Updating a connector</strong></summary>

### Community member or Airbyter

- Grant edit access to maintainers ([instructions](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests))
- Unit & integration tests added


### Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

- Create a non-forked branch based on this PR and test the below items on it
- Build is successful
- If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).

</details>

<details><summary><strong>Connector Generator</strong></summary>

- Issue acceptance criteria met
- PR name follows [PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook)
- If adding a new generator, add it to the [list of scaffold modules being tested](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connector-templates/generator/build.gradle#L41)
- The generator test modules (all connectors with `-scaffold` in their name) have been updated with the latest scaffold by running `./gradlew :airbyte-integrations:connector-templates:generator:generateScaffolds` then checking in your changes
- Documentation which references the generator is updated as needed

</details>

<details><summary><strong>Updating the Python CDK</strong></summary>

### Airbyter

Before merging:
- Pull Request description explains what problem it is solving
- Code change is unit tested
- Build and my-py check pass
- Smoke test the change on at least one affected connector
   - On Github: Run [this workflow](https://github.com/airbytehq/airbyte/actions/workflows/connectors_tests.yml), passing `--use-local-cdk --name=source-<connector>` as options
   - Locally: `airbyte-ci connectors --use-local-cdk --name=source-<connector> test`
- PR is reviewed and approved
      
After merging:
- [Publish the CDK](https://github.com/airbytehq/airbyte/actions/workflows/publish-cdk-command-manually.yml)
   - The CDK does not follow proper semantic versioning. Choose minor if this the change has significant user impact or is a breaking change. Choose patch otherwise.
   - Write a thoughtful changelog message so we know what was updated.
- Merge the platform PR that was auto-created for updating the Connector Builder's CDK version
   - This step is optional if the change does not affect the connector builder or declarative connectors.

</details>
2024-03-05 08:56:52 -08:00