Search roles

Search for roles in Snowflake.

Options

Field Definition Type Required

Result Set

Choose one of the following options to display your search results:

  • First Matching Record: Returns the first matching record.

  • First 100 Matching Records: Returns the first 100 matching records.

  • Stream Matching Records: Passes all matching records from your parent flow to a helper flow.

Dropdown TRUE

Filter

Choose one of the following filter options to search for roles:

  • Like: Filter the command output by role name. Uses case-insensitive pattern matching. This filter supports the Percentage(%) and Underscore(_) SQL wildcard characters.

  • Starts With: Filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching.

  • From Name: Enable fetching rows only following the first row whose object name matches the specified string. This filter is case-sensitive and doesn't have to be the full name.

Dropdown FALSE

Input

Field Definition Type Required

Search By

Role Name

The name of the role.

You can use a % or _ in the input field.

Text FALSE

Streaming

Flow

Click Choose Flow to browse and select a helper flow where the search results will be streamed, then click Choose to confirm.

Optionally, click the empty field under Click or drop here to create and add custom extensible fields that pass data to the helper flow. These fields are added as key/value pairs under the State output object in the helper flow.

This field appears when you select Stream Records from the Result Set field.

Flow

TRUE

Record Limit

Specify the number of records to stream.

  • When the Record Limit field is set to greater than 0, the stream returns up to the maximum number specified.

  • When the Record Limit field is null or not selected, all records are streamed.

  • The default value is 10000.

  • The valid range for the Like and Starts With filters is from 1 to 1000000. The valid range for the From Name filter is from 1 to 10000.

Number FALSE

Output

Field Definition Type

Result

Name

The name of the role.

Text

Comment

A comment for the role.

Text

Owner

The role that owns this role.

Text

Created On

The date and time when the role was created.

Date & Time

Is Default

If true, the role being fetched is the user's default role.

True/False

Is Current

If true, the role being fetched is the user's current role.

True/False

Is Inherited

If true, the role used to run the command inherits the specified role.

True/False

Assigned To

The number of users who are assigned to this role.

Number

Granted To

The number of roles to which this role has been granted.

Number

Granted Roles

The number of roles that have been granted to this role.

Number

Raw Output

The raw output returned by the Snowflake API.

Object

Records Streamed

The number of records streamed in a streaming flow.

This field appears when you select Stream Matching Records from the Result Set field.

Number