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: Invalidates and refreshes all the cached data and metadata of the given table.
  
  .. versionadded:: 2.0.0
  
  Parameters
  ----------
  tableName : str
      name of the table to get.
  
      .. versionchanged:: 3.4.0
          Allow ``tableName`` to be qualified with catalog name.
  
  Examples
  --------
  The example below caches a table, and then removes the data.
  
  >>> import tempfile
  >>> with tempfile.TemporaryDirectory() as d:
  ...     _ = spark.sql("DROP TABLE IF EXISTS tbl1")
  ...     _ = spark.sql(
  ...         "CREATE TABLE tbl1 (col STRING) USING TEXT LOCATION '{}'".format(d))
  ...     _ = spark.sql("INSERT INTO tbl1 SELECT 'abc'")
  ...     spark.catalog.cacheTable("tbl1")
  ...     spark.table("tbl1").show()
  +---+
  |col|
  +---+
  |abc|
  +---+
  
  Because the table is cached, it computes from the cached data as below.
  
  >>> spark.table("tbl1").count()
  1
  
  After refreshing the table, it shows 0 because the data does not exist anymore.
  
  >>> spark.catalog.refreshTable("tbl1")
  >>> spark.table("tbl1").count()
  0
  
  Using the fully qualified name for the table.
  
  >>> spark.catalog.refreshTable("spark_catalog.default.tbl1")
  >>> _ = spark.sql("DROP TABLE tbl1")
docstr_tok: ["Invalidates","and","refreshes","all","the","cached","data","and","metadata","of","the","given","table",".","..","versionadded",":",":","2.0.0","Parameters","--","--","--","--","--","tableName",":","str","name","of","the","table","to","get",".","..","versionchanged",":",":","3.4.0","Allow","``","tableName","``","to","be","qualified","with","catalog","name",".","Examples","--","--","--","--","The","example","below","caches","a","table",",","and","then","removes","the","data",".",">",">",">","import","tempfile",">",">",">","with","tempfile.TemporaryDirectory","(",")","as","d",":","...","_","=","spark.sql","(","``","DROP","TABLE","IF","EXISTS","tbl1","''",")","...","_","=","spark.sql","(","...","``","CREATE","TABLE","tbl1","(","col","STRING",")","USING","TEXT","LOCATION","'","{","}","'","''",".format","(","d",")",")","...","_","=","spark.sql","(","``","INSERT","INTO","tbl1","SELECT","'abc","'","''",")","...","spark.catalog.cacheTable","(","``","tbl1","''",")","...","spark.table","(","``","tbl1","''",")",".show","(",")","+","--","-+","|col|","+","--","-+","|abc|","+","--","-+","Because","the","table","is","cached",",","it","computes","from","the","cached","data","as","below",".",">",">",">","spark.table","(","``","tbl1","''",")",".count","(",")","1","After","refreshing","the","table",",","it","shows","0","because","the","data","does","not","exist","anymore",".",">",">",">","spark.catalog.refreshTable","(","``","tbl1","''",")",">",">",">","spark.table","(","``","tbl1","''",")",".count","(",")","0","Using","the","fully","qualified","name","for","the","table",".",">",">",">","spark.catalog.refreshTable","(","``","spark_catalog.default.tbl1","''",")",">",">",">","_","=","spark.sql","(","``","DROP","TABLE","tbl1","''",")"]
code: def refreshTable(self, tableName: str) -> None:
      """Invalidates and refreshes all the cached data and metadata of the given table.
  
      .. versionadded:: 2.0.0
  
      Parameters
      ----------
      tableName : str
          name of the table to get.
  
          .. versionchanged:: 3.4.0
              Allow ``tableName`` to be qualified with catalog name.
  
      Examples
      --------
      The example below caches a table, and then removes the data.
  
      >>> import tempfile
      >>> with tempfile.TemporaryDirectory() as d:
      ...     _ = spark.sql("DROP TABLE IF EXISTS tbl1")
      ...     _ = spark.sql(
      ...         "CREATE TABLE tbl1 (col STRING) USING TEXT LOCATION '{}'".format(d))
      ...     _ = spark.sql("INSERT INTO tbl1 SELECT 'abc'")
      ...     spark.catalog.cacheTable("tbl1")
      ...     spark.table("tbl1").show()
      +---+
      |col|
      +---+
      |abc|
      +---+
  
      Because the table is cached, it computes from the cached data as below.
  
      >>> spark.table("tbl1").count()
      1
  
      After refreshing the table, it shows 0 because the data does not exist anymore.
  
      >>> spark.catalog.refreshTable("tbl1")
      >>> spark.table("tbl1").count()
      0
  
      Using the fully qualified name for the table.
  
      >>> spark.catalog.refreshTable("spark_catalog.default.tbl1")
      >>> _ = spark.sql("DROP TABLE tbl1")
      """
      self._jcatalog.refreshTable(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 26 for calling the Catalog obj's underlying member method code with example usage: obj.refreshTable(tableName) without return types