cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Accessing views using unitycatalog module

ik8
New Contributor

Hi, I'm trying to access to views in my catalog in databricks using unitycatalog open source module

when I try to do so I get an error message that indicates this is not possible:

cannot be accessed from outside of Databricks Compute Environment due to its kind being TABLE_VIEW. Only 'TABLE_EXTERNAL', 'TABLE_DELTA_EXTERNAL' and 'TABLE_DELTA' table kinds can be accessed externally."

Is there an option to allow to do so in the workspace? or for specific views?

1 ACCEPTED SOLUTION

Accepted Solutions

BigRoux
Databricks Employee
Databricks Employee

Here are helpful tips/tricks:

 

Based on the latest Databricks documentation and internal guides, it is currently not possible to grant external access (via open source Unity Catalog APIs or credential vending) to Unity Catalog views (i.e., objects with kind=TABLE_VIEW). Only the following table types are supported for external access:
  • Managed Delta tables (kind=TABLE_DELTA)
  • External tables (kind=TABLE_EXTERNAL)
  • External Delta tables (kind=TABLE_DELTA_EXTERNAL)
Views (TABLE_VIEW) are explicitly excluded from this capability, which is enforced by both the Databricks Unity Catalog APIs and supporting documentation. This restriction exists because the external access mechanism (โ€œcredential vendingโ€) generates temporary, finely-scoped credentials to allow direct cloud storage access. This only works for tables where data is physically represented as files in storage (like Delta/external tables), but not for views, which are virtual constructs and may reference multiple tables or have complex logic requiring a Databricks Compute environment to resolve/execute.

Key Points:

  • No configuration exists (at the workspace, catalog, or per-view level) to override this restriction for views. You cannot grant external access to views via Unity Catalogโ€™s current external access API, even using the โ€œEXTERNAL USE SCHEMAโ€ privilege.
  • This limitation is documented: โ€œOnly Unity Catalog managed tables and Unity Catalog external tables are supported.โ€ (See Databricks documentation on credential vending.)
  • Attempting to access a view as an external client results in the specific error: cannot be accessed from outside of Databricks Compute Environment due to its kind being TABLE_VIEW... (as you observed).

Workarounds or Alternatives

There is no supported workaround to expose Unity Catalog views externally. Common suggestions include: - โ€œWorkaround is normally using the single user mode for now as in those environments, we donโ€™t need to support isolation so most apis are allowed unless incompatible with UC metastore design.โ€ However, this only applies to compute access within Databricksโ€”not to credential vending or external system access. - Materialize the viewโ€™s logic into a managed or external Delta table (using CREATE TABLE AS SELECT) if you need to make derived data available externally. - Use Delta Sharing if you need to share query results or tables outside of Databricks (for tabular datasets only, not for views as logical constructs).

Why This Restriction?

  • Views require SQL engine resolutionโ€”they are not materialized and so their results canโ€™t be provisioned by directly reading files in cloud storage. This distinction underlies why only tables, not views, are accessible via external open APIs.

Summary Table

Object Type in Unity Catalog Supported for External Access (Open APIs/Credential Vending)? Workaround
Managed Delta Table Yes N/A
External Table (Delta/other) Yes N/A
Table View (TABLE_VIEW) No None (see above)
Materialized View No (as of last update) None

Conclusion

  • It is not possible to enable external access (globally or per-object) for Unity Catalog views today.
  • No configuration or workaround exists to bypass this limitation: only select table types are eligible for external access.
  • If external access is required for view results, you must materialize the viewโ€™s logic into a supported table type.
If your use case requires this feature, consider Delta Sharing for table-based external access.
 
Hope this help, Louis.

View solution in original post

1 REPLY 1

BigRoux
Databricks Employee
Databricks Employee

Here are helpful tips/tricks:

 

Based on the latest Databricks documentation and internal guides, it is currently not possible to grant external access (via open source Unity Catalog APIs or credential vending) to Unity Catalog views (i.e., objects with kind=TABLE_VIEW). Only the following table types are supported for external access:
  • Managed Delta tables (kind=TABLE_DELTA)
  • External tables (kind=TABLE_EXTERNAL)
  • External Delta tables (kind=TABLE_DELTA_EXTERNAL)
Views (TABLE_VIEW) are explicitly excluded from this capability, which is enforced by both the Databricks Unity Catalog APIs and supporting documentation. This restriction exists because the external access mechanism (โ€œcredential vendingโ€) generates temporary, finely-scoped credentials to allow direct cloud storage access. This only works for tables where data is physically represented as files in storage (like Delta/external tables), but not for views, which are virtual constructs and may reference multiple tables or have complex logic requiring a Databricks Compute environment to resolve/execute.

Key Points:

  • No configuration exists (at the workspace, catalog, or per-view level) to override this restriction for views. You cannot grant external access to views via Unity Catalogโ€™s current external access API, even using the โ€œEXTERNAL USE SCHEMAโ€ privilege.
  • This limitation is documented: โ€œOnly Unity Catalog managed tables and Unity Catalog external tables are supported.โ€ (See Databricks documentation on credential vending.)
  • Attempting to access a view as an external client results in the specific error: cannot be accessed from outside of Databricks Compute Environment due to its kind being TABLE_VIEW... (as you observed).

Workarounds or Alternatives

There is no supported workaround to expose Unity Catalog views externally. Common suggestions include: - โ€œWorkaround is normally using the single user mode for now as in those environments, we donโ€™t need to support isolation so most apis are allowed unless incompatible with UC metastore design.โ€ However, this only applies to compute access within Databricksโ€”not to credential vending or external system access. - Materialize the viewโ€™s logic into a managed or external Delta table (using CREATE TABLE AS SELECT) if you need to make derived data available externally. - Use Delta Sharing if you need to share query results or tables outside of Databricks (for tabular datasets only, not for views as logical constructs).

Why This Restriction?

  • Views require SQL engine resolutionโ€”they are not materialized and so their results canโ€™t be provisioned by directly reading files in cloud storage. This distinction underlies why only tables, not views, are accessible via external open APIs.

Summary Table

Object Type in Unity Catalog Supported for External Access (Open APIs/Credential Vending)? Workaround
Managed Delta Table Yes N/A
External Table (Delta/other) Yes N/A
Table View (TABLE_VIEW) No None (see above)
Materialized View No (as of last update) None

Conclusion

  • It is not possible to enable external access (globally or per-object) for Unity Catalog views today.
  • No configuration or workaround exists to bypass this limitation: only select table types are eligible for external access.
  • If external access is required for view results, you must materialize the viewโ€™s logic into a supported table type.
If your use case requires this feature, consider Delta Sharing for table-based external access.
 
Hope this help, Louis.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now