Skip to main content

vw_account_user_roles

Creates, updates, deletes, gets or lists a vw_account_user_roles resource.

Overview

Namevw_account_user_roles
TypeView
Iddatabricks_account.iam.vw_account_user_roles

Fields

The following fields are returned by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.
idstringUnique identifier for the account user.
userNamestringUsername (typically email address) of the account user.
displayNamestringHuman-readable display name of the account user.
rolestringRole assigned to the user (one row per role assignment).

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.

SELECT Examples

SELECT
account_id,
id,
userName,
displayName,
role
FROM databricks_account.iam.vw_account_user_roles
WHERE account_id = '{{ account_id }}';

SQL Definition

SELECT
u.account_id,
u.id,
u.userName,
u.displayName,
JSON_EXTRACT(r.value, '$.value') AS role
FROM databricks_account.iam.account_users u,
JSON_EACH(u.roles) r
WHERE account_id = '{{ account_id }}'