title: How to list all tables in database using Spark SQL?
body: <p>I have a SparkSQL connection to an external database:</p>
  
  <pre><code>from pyspark.sql import SparkSession
  
  spark = SparkSession \
    .builder \
    .appName("Python Spark SQL basic example") \
    .getOrCreate()
  </code></pre>
  
  <p>If I know the name of a table, it's easy to query.</p>
  
  <pre><code>users_df = spark \
    .read.format("jdbc") \
    .options(dbtable="users", **db_config) \
    .load()
  </code></pre>
  
  <p>But is there a good way to list/discover tables?</p>
  
  <p>I want the equivalent of <code>SHOW TABLES</code> in mysql, or <code>\dt</code> in postgres.</p>
  
  <p>I'm using pyspark v2.1, in case that makes any difference.</p>