Forum Discussion

spark123's avatar
spark123
Frequent Visitor
1 year ago
Solved

SHOW PARTITIONS on OneLake-based Delta tables in Fabric

Hello,


I am trying to use SHOW PARTITIONS on a partitionned delta table but i am facing this error, i also tried to use the deltalake library but it doesnt work

did anybody face this error ?

PS : [THE TABLE IS PARTITONNNED]

 


[INVALID_PARTITION_OPERATION.PARTITION_MANAGEMENT_IS_UNSUPPORTED] The partition command is invalid. Table spark_catalog.chimcob***fe9ln6s31cdi*****************6pavcpq70nr1d******4li64ro.tbl_sales_****_bronze does not support partition management.; line 1 pos 16; ShowPartitions [partition#726] +- ResolvedTable org.apache.spark.sql.delta.catalog.DeltaCatalog@64a60cb8, chimcob Time: Wed Jan 21 01:30:30 UTC 1970 Last Access: UNKNOWN Created By: Spark Type: MANAGED Provider: delta Comment: Delta table auto-discovered from Onelake

4 Replies

  • v-lgarikapat's avatar
    v-lgarikapat
    Icon for Community Support rankCommunity Support

    Hi spark123 ,

     

    Thanks for reaching out to the Microsoft Fabric Community Forum.

    Based on the error screenshot you provided

    It looks like Delta tables in Microsoft OneLake/Fabric do not support explicit partition management using SHOW PARTITIONS. Unlike traditional Hive-style partitioned tables, Delta Lake manages partitions automatically, which means direct partition manipulation commands aren’t available.

    Workarounds

    Using DeltaLake Python API

    from delta.tables import DeltaTable

    dt = DeltaTable.forName(spark, "your_table")

    dt.detail().show()

    DESCRIBE DETAIL your_table;

    Use SQL to get distinct partition values:

    SELECT DISTINCT partition_column_name FROM LakehouseCatalogName.schemaName.tableName;

    SELECT DISTINCT partition_column FROM your_table;

    I have included resolved community threads and official learning resources that may be helpful to you

     

    SQL Analytics Endpoint Performance Considerations - Microsoft Fabric | Microsoft Learn

    Lakehouse and Delta tables - Microsoft Fabric | Microsoft Learn

    Solved: Add partition to existing Delta Table - Microsoft Fabric Community

    Solved: Re: Seeking partition strategy - Microsoft Fabric Community

     

    Best Regards,

    Lakshmi Narayana

    • v-lgarikapat's avatar
      v-lgarikapat
      Icon for Community Support rankCommunity Support

      Hi spark123 ,

       

      I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution" so other members can easily find it.

       

      Best Regards,

      Lakshmi Narayana

      • v-lgarikapat's avatar
        v-lgarikapat
        Icon for Community Support rankCommunity Support

        Hi spark123 ,

         

         If your issue has been resolved, please consider marking the most helpful reply as the accepted solution. This helps other community members who may encounter the same issue to find answers more efficiently.

        If you're still facing challenges, feel free to let us know we’ll be glad to assist you further.

        Looking forward to your response.

        Best regards,
        LakshmiNarayana.