-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Python API for restoring delta table #903
Conversation
Hi, @tdas, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Maks-D for the PR. The PR looks good. Minor comments. I am wondering if you could split this into two PRs (one PR handling the python API and other other one handling the refactoring)
self.__overwriteDeltaTable([('a', 3), ('b', 2)], | ||
schema=["key_new", "value_new"], | ||
overwriteSchema='true') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check to verify that data has changed?
self.__checkAnswer(restored, [Row(key='a', value=3), Row(key='b', value=2)])
?
Similarly in the above test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both tests are updated
* Add possibility to restore delta table using version or timestamp from pyspark Examples: ``` DeltaTable.forPath(spark, path).restoreToVersion(0) DeltaTable.forPath(spark, path).restoreToTimestamp('2021-01-01 01:01-01') ``` Fixes delta-io#890 Signed-off-by: Maksym Dovhal <maksym.dovhal@gmail.com>
2550587
to
f5af1c6
Compare
@vkorukanti Thank you for review. |
* Add possibility to restore delta table using version or timestamp from pyspark Examples: ``` DeltaTable.forPath(spark, path).restoreToVersion(0) DeltaTable.forPath(spark, path).restoreToTimestamp('2021-01-01 01:01-01') ``` Tested by unit tests. Fixes #890 Signed-off-by: Maksym Dovhal <maksym.dovhal@gmail.com> Closes #903 Signed-off-by: Venki Korukanti <venki.korukanti@databricks.com> GitOrigin-RevId: 8ca6a3643d97b1a95ebf3a48edcb23f4f2adb6f4
* Add possibility to restore delta table using version or timestamp from pyspark Examples: ``` DeltaTable.forPath(spark, path).restoreToVersion(0) DeltaTable.forPath(spark, path).restoreToTimestamp('2021-01-01 01:01-01') ``` Tested by unit tests. Fixes delta-io#890 Signed-off-by: Maksym Dovhal <maksym.dovhal@gmail.com> Closes delta-io#903 Signed-off-by: Venki Korukanti <venki.korukanti@databricks.com> GitOrigin-RevId: 8ca6a3643d97b1a95ebf3a48edcb23f4f2adb6f4
* Add possibility to restore delta table using version or timestamp from pyspark Examples: ``` DeltaTable.forPath(spark, path).restoreToVersion(0) DeltaTable.forPath(spark, path).restoreToTimestamp('2021-01-01 01:01-01') ``` Tested by unit tests. Fixes delta-io#890 Signed-off-by: Maksym Dovhal <maksym.dovhal@gmail.com> Closes delta-io#903 Signed-off-by: Venki Korukanti <venki.korukanti@databricks.com> GitOrigin-RevId: 8ca6a3643d97b1a95ebf3a48edcb23f4f2adb6f4
Examples:
Tested by unit tests.
Fixes #890
Signed-off-by: Maksym Dovhal maksym.dovhal@gmail.com