Is it possible to read certain partitions from a folder using spark?
I only know this way: df = spark.read.parquet("/mnt/Staging/file_Name/")
Is there any way to read only those partitions where the date is not less than today minus 3 months?
Is it possible to read certain partitions from a folder using spark?
I only know this way: df = spark.read.parquet("/mnt/Staging/file_Name/")
Is there any way to read only those partitions where the date is not less than today minus 3 months?
if your dataframe is partitioned by date, you can just use filter, spark will read only partitions with this date
df = spark.read.parquet("/mnt/Staging/file_Name/").filter(col("your_date_col") === "2022-02-03")