Skip to content

[FEAT] Expose Validate DataFrame Schema API - #2

Open
huaziyao wants to merge 14 commits into
aws:mainfrom
huaziyao:main
Open

[FEAT] Expose Validate DataFrame Schema API#2
huaziyao wants to merge 14 commits into
aws:mainfrom
huaziyao:main

Conversation

@huaziyao

@huaziyao huaziyao commented Feb 8, 2022

Copy link
Copy Markdown

Issue #, if available:

Description of changes:
The validation logic exists as part of the data ingestion. This change separates out the validation logic and expose it on the Scala and Python interface.

Data type conversion was part of validation. This change moves it to its own function.

Unit tests and integration tests are added.

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backword compatible
  • I used the commit message format described in CONTRIBUTING doc

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have verified all code in this commit are well formatted

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@huaziyao huaziyao changed the title draft exposing validation API in scala Expose Validate DataFrame Schema API Feb 10, 2022
@huaziyao huaziyao changed the title Expose Validate DataFrame Schema API [FEAT] Expose Validate DataFrame Schema API Feb 10, 2022
@huaziyao
huaziyao marked this pull request as ready for review February 10, 2022 18:46

@aws-patlin aws-patlin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@chenliu0831 chenliu0831 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One minor comment


# negative validation
non_matching_df = identity_df.withColumn("ExtraColumn", lit("extraValue"))
with tc.assertRaises(Py4JJavaError):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we match the exception message as well?

@can-sun can-sun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please rebase your commits?

val region = featureGroupArnResolver.resolveRegion()

val describeResponse = getFeatureGroup(featureGroupName)
validateDataFrameSchemaWithDescription(inputDataFrame, featureGroupArn, describeResponse)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"Description” looks a little bit confusing, I would recommend to change the method name to something like "validateDataFrameSchemaWithFeatureGroup"

can-sun added a commit that referenced this pull request Dec 8, 2022
* Add test dependencies for spark connector

* Add integration tests

* Remove unnecessary code block for integration test

* Fix variable name

* Install boto3 on EMR

* Fix integration test

* Fix the iceberg feature group name

* Remove validation of iceberg ingestin for now

* New fix

* Fix the test

* Fix the iceberg test

* Fix the offline_store_df

* Fix offline_store_df #2

* Update for final release

* Add more artifacts that should be ignored by Git

* Add assembly output to gitignore

* Add iceberg-runtime back as dependency
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.

4 participants