Viewing tables
Once you've created a SparkSession, you can start poking around to see what data is in your cluster!
Your SparkSession has an attribute called catalog which lists all the data inside the cluster. This attribute has a few methods for extracting different pieces of information.
One of the most useful is the .listTables() method, which returns the names of all the tables in your cluster as a list.
Questo esercizio fa parte del corso
Foundations of PySpark
Istruzioni dell'esercizio
- See what tables are in your cluster by calling
spark.catalog.listTables()and printing the result!
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Print the tables in the catalog
print(spark.____.____())