Last active
August 26, 2025 03:29
-
-
Save jeanmidevacc/0f2ee863ac491afed11096936a05fd92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # How to colect table versions | |
| query = f""" | |
| SELECT * | |
| FROM (DESCRIBE HISTORY name_of_the_table) | |
| WHERE timestamp >= '{start_date.strftime('%Y-%m-%d %H:%M:%S')}'; | |
| """ | |
| # How to get a specific version | |
| dfs_recommendations = spark.read.format("delta").option("versionAsOf", version_id).table(f"name_of_the_table") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment