class_docstr: User-facing catalog API, accessible through `SparkSession.catalog`.
  
  This is a thin wrapper around its Scala implementation org.apache.spark.sql.catalog.Catalog.
  
  .. versionchanged:: 3.4.0
      Supports Spark Connect.
class_docstr_tok: ["User-facing","catalog","API",",","accessible","through","`","SparkSession.catalog","`",".","This","is","a","thin","wrapper","around","its","Scala","implementation","org.apache.spark.sql.catalog.Catalog",".","..","versionchanged",":",":","3.4.0","Supports","Spark","Connect","."]
docstr: Recovers all the partitions of the given table and updates the catalog.
  
  .. versionadded:: 2.1.1
  
  Parameters
  ----------
  tableName : str
      name of the table to get.
  
  Notes
  -----
  Only works with a partitioned table, and not a view.
  
  Examples
  --------
  The example below creates a partitioned table against the existing directory of
  the partitioned table. After that, it recovers the partitions.
  
  >>> import tempfile
  >>> with tempfile.TemporaryDirectory() as d:
  ...     _ = spark.sql("DROP TABLE IF EXISTS tbl1")
  ...     spark.range(1).selectExpr(
  ...         "id as key", "id as value").write.partitionBy("key").mode("overwrite").save(d)
  ...     _ = spark.sql(
  ...          "CREATE TABLE tbl1 (key LONG, value LONG)"
  ...          "USING parquet OPTIONS (path '{}') PARTITIONED BY (key)".format(d))
  ...     spark.table("tbl1").show()
  ...     spark.catalog.recoverPartitions("tbl1")
  ...     spark.table("tbl1").show()
  +-----+---+
  |value|key|
  +-----+---+
  +-----+---+
  +-----+---+
  |value|key|
  +-----+---+
  |    0|  0|
  +-----+---+
  >>> _ = spark.sql("DROP TABLE tbl1")
docstr_tok: ["Recovers","all","the","partitions","of","the","given","table","and","updates","the","catalog",".","..","versionadded",":",":","2.1.1","Parameters","--","--","--","--","--","tableName",":","str","name","of","the","table","to","get",".","Notes","--","--","-","Only","works","with","a","partitioned","table",",","and","not","a","view",".","Examples","--","--","--","--","The","example","below","creates","a","partitioned","table","against","the","existing","directory","of","the","partitioned","table",".","After","that",",","it","recovers","the","partitions",".",">",">",">","import","tempfile",">",">",">","with","tempfile.TemporaryDirectory","(",")","as","d",":","...","_","=","spark.sql","(","``","DROP","TABLE","IF","EXISTS","tbl1","''",")","...","spark.range","(","1",")",".selectExpr","(","...","``","id","as","key","''",",","``","id","as","value","''",")",".write.partitionBy","(","``","key","''",")",".mode","(","``","overwrite","''",")",".save","(","d",")","...","_","=","spark.sql","(","...","``","CREATE","TABLE","tbl1","(","key","LONG",",","value","LONG",")","''","...","``","USING","parquet","OPTIONS","(","path","'","{","}","'",")","PARTITIONED","BY","(","key",")","''",".format","(","d",")",")","...","spark.table","(","``","tbl1","''",")",".show","(",")","...","spark.catalog.recoverPartitions","(","``","tbl1","''",")","...","spark.table","(","``","tbl1","''",")",".show","(",")","+","--","--","-+","--","-+","|value|key|","+","--","--","-+","--","-+","+","--","--","-+","--","-+","+","--","--","-+","--","-+","|value|key|","+","--","--","-+","--","-+","|","0|","0|","+","--","--","-+","--","-+",">",">",">","_","=","spark.sql","(","``","DROP","TABLE","tbl1","''",")"]
code: def recoverPartitions(self, tableName: str) -> None:
      """Recovers all the partitions of the given table and updates the catalog.
  
      .. versionadded:: 2.1.1
  
      Parameters
      ----------
      tableName : str
          name of the table to get.
  
      Notes
      -----
      Only works with a partitioned table, and not a view.
  
      Examples
      --------
      The example below creates a partitioned table against the existing directory of
      the partitioned table. After that, it recovers the partitions.
  
      >>> import tempfile
      >>> with tempfile.TemporaryDirectory() as d:
      ...     _ = spark.sql("DROP TABLE IF EXISTS tbl1")
      ...     spark.range(1).selectExpr(
      ...         "id as key", "id as value").write.partitionBy("key").mode("overwrite").save(d)
      ...     _ = spark.sql(
      ...          "CREATE TABLE tbl1 (key LONG, value LONG)"
      ...          "USING parquet OPTIONS (path '{}') PARTITIONED BY (key)".format(d))
      ...     spark.table("tbl1").show()
      ...     spark.catalog.recoverPartitions("tbl1")
      ...     spark.table("tbl1").show()
      +-----+---+
      |value|key|
      +-----+---+
      +-----+---+
      +-----+---+
      |value|key|
      +-----+---+
      |    0|  0|
      +-----+---+
      >>> _ = spark.sql("DROP TABLE tbl1")
      """
      self._jcatalog.recoverPartitions(tableName)
  
imports: import sys
  import warnings
  from typing import Any, Callable, NamedTuple, List, Optional, TYPE_CHECKING
  from pyspark.errors import PySparkTypeError
  from pyspark.storagelevel import StorageLevel
  from pyspark.sql.dataframe import DataFrame
  from pyspark.sql.session import SparkSession
  from pyspark.sql.types import StructType
label_desc: Use image node_id 27 for calling the Catalog obj's underlying member method code with example usage: obj.recoverPartitions(tableName) without return types