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

[DOP-8208] Fix validation ot includeHeaders #131

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Aug 18, 2023

Change Summary

  • Fixed validation of headers column is written to Kafka with default Kafka.WriteOptions() - includeHeaders had no default value, so instead of raising an exception, column value was just ignored. Now default value is explicitly set to False.
  • Add check for Spark version to Kafka.write_df_to_target, raise exception if user passed include_headers=True on Spark 2.4, there this option does not exist.
  • Reviewed list of columns user can pass to DBWriter.run for Kafka - timestamp and timestampType are not supported by Spark, offset is not supported by Kafka.
  • Add more unit tests for Kafka options

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus temporarily deployed to test-pypi August 18, 2023 14:57 — with GitHub Actions Inactive
@dolfinus dolfinus self-assigned this Aug 18, 2023
@dolfinus dolfinus temporarily deployed to test-pypi August 18, 2023 15:05 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi August 18, 2023 15:13 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi August 18, 2023 15:17 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #131 (3fc9807) into develop (ebbeed2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #131   +/-   ##
========================================
  Coverage    94.29%   94.30%           
========================================
  Files          207      207           
  Lines         7697     7703    +6     
  Branches      1451     1449    -2     
========================================
+ Hits          7258     7264    +6     
  Misses         320      320           
  Partials       119      119           
Files Changed Coverage Δ
onetl/connection/db_connection/kafka/connection.py 98.99% <100.00%> (+0.01%) ⬆️
onetl/connection/db_connection/kafka/options.py 100.00% <100.00%> (ø)

@dolfinus dolfinus temporarily deployed to test-pypi August 30, 2023 08:06 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi August 30, 2023 08:09 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi August 30, 2023 08:59 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi August 30, 2023 11:12 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 4, 2023 08:05 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 08:33 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 08:47 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 08:51 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 08:53 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 08:59 — with GitHub Actions Inactive
@dolfinus dolfinus temporarily deployed to test-pypi September 5, 2023 10:36 — with GitHub Actions Inactive
@dolfinus dolfinus changed the title [DOP-8208] Detect includeHeaders value automatically during write [DOP-8208] Fix validation ot includeHeaders Sep 5, 2023
@dolfinus dolfinus marked this pull request as ready for review September 5, 2023 10:43
@dolfinus dolfinus merged commit f48448c into develop Sep 6, 2023
33 checks passed
@dolfinus dolfinus deleted the bugfix/DOP-8208 branch September 6, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants