Query a table in Snowflake Open Catalog using a third-party engine¶
This topic provides instructions for using a third-party query engine to query a table in Snowflake Open Catalog.
Prerequisites¶
Before you can query a table in Open Catalog, you must do the following:
Grant read privileges to the catalog you created. For more information, see Secure catalogs.
Register the service connection you configured. For more information, see Register a service connection.
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()