Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 (contribution) Fix SQL model to build a Type 2 SCD to handle NULL cursor_field values correctly #4881

Merged
merged 11 commits into from
Jul 22, 2021

Conversation

ChristopheDuong
Copy link
Contributor

@ChristopheDuong ChristopheDuong commented Jul 21, 2021

What

Wrap-up contribution from #4802

How

Recommended reading order

  1. airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py
  2. the rest

Pre-merge Checklist

Expand the checklist which is relevant for this PR.

Connector checklist

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • Secrets are annotated with airbyte_secret in the connector's spec
  • Credentials added to Github CI if needed and not already present. instructions for injecting secrets into CI.
  • Unit & integration tests added as appropriate (and are passing)
    • Community members: please provide proof of this succeeding locally e.g: screenshot or copy-paste 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.
  • /test connector=connectors/<name> command as documented here is passing.
    • Community members can skip this, Airbyters will run this for you.
  • Code reviews completed
  • Documentation updated
    • README.md
    • docs/SUMMARY.md if it's a new connector
    • Created or updated reference docs in docs/integrations/<source or destination>/<name>.
    • Changelog in the appropriate page in docs/integrations/.... See changelog example
    • docs/integrations/README.md contains a reference to the new connector
    • Build status added to build page
  • Build is successful
  • Connector version bumped like described here
  • New Connector version released on Dockerhub by running the /publish command described here
  • No major blockers
  • PR merged into master branch
  • Follow up tickets have been created
  • Associated tickets have been closed & stakeholders notified

@ChristopheDuong ChristopheDuong changed the title Update normalization tests 🐛 (contribution) Fix SQL model to build a Type 2 SCD to handle NULL cursor_field values correctly Jul 21, 2021
@github-actions github-actions bot added the area/worker Related to worker label Jul 21, 2021
Comment on lines +162 to +169
credentials = profiles_config
profiles_config = {
"credentials_json": json.dumps(credentials),
"dataset_id": self.target_schema,
"project_id": credentials["project_id"],
}
elif destination_type.value == DestinationType.MYSQL.value:
profiles_config["database"] = self.target_schema
Copy link
Contributor Author

@ChristopheDuong ChristopheDuong Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are necessary to fix normalization integration tests due to: #4699

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jul 21, 2021
@@ -7,7 +7,6 @@ dependencies {
implementation 'commons-cli:commons-cli:1.4'

implementation project(':airbyte-protocol:models')
implementation project(':airbyte-queue')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristopheDuong
Copy link
Contributor Author

ChristopheDuong commented Jul 21, 2021

/publish connector=bases/base-normalization

🕑 bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1052739860
❌ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1052739860

@ChristopheDuong
Copy link
Contributor Author

ChristopheDuong commented Jul 21, 2021

Why does the ordering of Gradle tasks differ from running on local in the GitHub CI?

It seems, if I am not wrong, that the test is being run before docker images are being built?

  1. Running at 2021-07-21T13:52:32.9882761Z
    Screenshot 2021-07-21 at 16 24 23
  2. Building at 2021-07-21T13:52:40.7024761Z
    Screenshot 2021-07-21 at 16 24 47

I ran the command locally and successfully published the docker image to dockernub...

@@ -281,3 +281,12 @@ Note that all the choices made by Normalization as described in this documentati
* to build a [custom SQL view](../operator-guides/transformation-and-normalization/transformations-with-sql.md) with your own naming conventions
* to export, edit and run [custom dbt normalization](../operator-guides/transformation-and-normalization/transformations-with-dbt.md) yourself
* or further, you can configure the use of a custom dbt project within Airbyte by following [this guide](../operator-guides/transformation-and-normalization/transformations-with-airbyte.md).

## CHANGELOG
Copy link
Contributor Author

@ChristopheDuong ChristopheDuong Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avaidyanatha I'm guessing, it's good if I'm adding this similar to connectors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristopheDuong Absolutely, this is good!

@ChristopheDuong ChristopheDuong merged commit 5cdc7f8 into master Jul 22, 2021
@ChristopheDuong ChristopheDuong deleted the chris/dedup-nulls-last branch July 22, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation area/worker Related to worker normalization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants