Query a table in Polaris Catalog™ using a third-party engine

This topic provides instructions for using a third-party query engine to query a table in Polaris Catalog™.

Prerequisites

Before you can query a table in Polaris Catalog, you must do the following:

Example: Query a table

The following example code shows how to use Apache Spark to query the customers table in the catalog1 catalog. The customers table is located under namespace1a, which is nested under the top-level namespace named namespace1.

spark.sql("use catalog1").show()
spark.sql("use namespace1.namespace1a").show()
spark.sql("SELECT * FROM customers").show()
Copy