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

Fixed appending to tables by adding filtering of None rows #356

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

william-conti
Copy link
Contributor

This PR aims to fix #297 and #346

It adds a utility method to filter rows that have a column containing None, this will help Crawlers to not throw an error when a column is None.

it also checks if the column in the class is Nullable or not, if it's nullable and the value is None, it's ignored

@william-conti william-conti changed the title Fixing writing empty objects Add utility method to filter rows with columns containing None Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #356 (8091d5f) into main (035320c) will increase coverage by 0.32%.
The diff coverage is 100.00%.

❗ Current head 8091d5f differs from pull request most recent head 10dede4. Consider uploading reports for the commit 10dede4 to get more accurate results

@@            Coverage Diff             @@
##             main     #356      +/-   ##
==========================================
+ Coverage   83.47%   83.80%   +0.32%     
==========================================
  Files          30       30              
  Lines        2269     2272       +3     
  Branches      395      400       +5     
==========================================
+ Hits         1894     1904      +10     
+ Misses        290      284       -6     
+ Partials       85       84       -1     
Files Coverage Δ
src/databricks/labs/ucx/framework/crawlers.py 88.23% <100.00%> (+3.05%) ⬆️

... and 4 files with indirect coverage changes

Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

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

looks great! few additions, though

Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

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

👍

@nfx nfx changed the title Add utility method to filter rows with columns containing None Fixed appending to tables by adding filtering of None rows Oct 3, 2023
@nfx nfx added this pull request to the merge queue Oct 3, 2023
Merged via the queue into main with commit 40919a7 Oct 3, 2023
nfx added a commit that referenced this pull request Oct 3, 2023
* Added `inventory_database` name check during installation ([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have been synchronised to Unity Catalog already or not ([#306](#306)).
* Added a migration state to skip already migrated tables ([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows ([#356](#356)).
* Fixed handling of missing but linked cluster policies. ([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that… ([#357](#357)).
* Skip group migration when no groups are available after preparation step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0 ([#362](#362)).
@nfx nfx mentioned this pull request Oct 3, 2023
nfx added a commit that referenced this pull request Oct 3, 2023
* Added `inventory_database` name check during installation
([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have
been synchronised to Unity Catalog already or not
([#306](#306)).
* Added a migration state to skip already migrated tables
([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows
([#356](#356)).
* Fixed handling of missing but linked cluster policies.
([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during
installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that…
([#357](#357)).
* Skip group migration when no groups are available after preparation
step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0
([#362](#362)).
zpappa pushed a commit that referenced this pull request Oct 4, 2023
This PR aims to fix #297 and
#346

It adds a utility method to filter rows that have a column containing
None, this will help Crawlers to not throw an error when a column is
None.

it also checks if the column in the class is Nullable or not, if it's
nullable and the value is None, it's ignored
zpappa pushed a commit that referenced this pull request Oct 4, 2023
* Added `inventory_database` name check during installation
([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have
been synchronised to Unity Catalog already or not
([#306](#306)).
* Added a migration state to skip already migrated tables
([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows
([#356](#356)).
* Fixed handling of missing but linked cluster policies.
([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during
installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that…
([#357](#357)).
* Skip group migration when no groups are available after preparation
step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0
([#362](#362)).
@nfx nfx deleted the fix_empty_objects branch October 17, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

assess_jobs fails with “PySparkValueError: [CANNOT_BE_NONE] Argument obj can not be None.”
2 participants