We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d7384c commit 891ada5Copy full SHA for 891ada5
python/pyspark/sql/context.py
@@ -574,6 +574,15 @@ def _ssql_ctx(self):
574
def _get_hive_ctx(self):
575
return self._jvm.HiveContext(self._jsc.sc())
576
577
+ def refreshTable(self, tableName):
578
+ """Invalidate and refresh all the cached the metadata of the given
579
+ table. For performance reasons, Spark SQL or the external data source
580
+ library it uses might cache certain metadata about a table, such as the
581
+ location of blocks. When those change outside of Spark SQL, users should
582
+ call this function to invalidate the cache.
583
+ """
584
+ self._ssql_ctx.refreshTable(tableName)
585
+
586
587
class UDFRegistration(object):
588
"""Wrapper for user-defined function registration."""
0 commit comments