SHOW LISTINGS

アクセスする権限がある リスト をリスト表示します。コマンドを実行しているユーザーがリストに対して USAGE、MODIFY、OWNERSHIP のいずれかを持つリストのみを表示します。

こちらもご参照ください。

CREATE LISTINGALTER LISTINGDESCRIBE LISTINGDROP LISTING

構文

SHOW LISTINGS [ LIKE '<pattern>' ]
              [ STARTS WITH '<name_string>' ]
              [ LIMIT <rows> [ FROM '<name_string>' ] ]
Copy

オプションのパラメーター

LIKE 'pattern'

オプションで、オブジェクト名でコマンド出力をフィルタリングします。フィルターは、 SQL ワイルドカード文字(% および _)をサポートする、 大文字と小文字を区別しない パターンマッチングを使用します。

たとえば、次のパターンは 同じ 結果を返します。

... LIKE '%testing%' ...
... LIKE '%TESTING%' ...

. デフォルト: 値なし(フィルタリングは出力に非適用)。

STARTS WITH 'name_string'

オプションで、オブジェクト名の先頭に表示される文字に基づいてコマンド出力をフィルタリングします。文字列は一重引用符で囲む必要があり、 大文字と小文字を区別します

たとえば、次の文字列は 異なる 結果を返します。

... STARTS WITH 'B' ...
... STARTS WITH 'b' ...

. デフォルト: 値なし(フィルターは出力に適用されない)

LIMIT rows [ FROM 'name_string' ]

オプションで、返される行の最大数を制限すると同時に、結果の「ページネーション」を有効にします。実際に返される行数は、指定された制限より少ない場合があります。例えば、既存のオブジェクトの数が指定された制限より少ないなどです。

オプションの FROM 'name_string' サブ句は、結果の「カーソル」として効果的に機能します。これにより、指定された文字列と一致するオブジェクト名を持つ最初の行に続く指定された行数を取得できます。

  • 文字列は一重引用符で囲む必要があり、 大文字と小文字を区別します

  • 文字列に完全なオブジェクト名を含める必要はありません。部分的な名前がサポートされています。

デフォルト:値なし(出力に制限は適用されない)

注釈

FROM 'name_string' 句と STARTS WITH 'name_string' 句の両方をサポートする SHOW コマンドの場合、同じステートメントでこれらの両方の句を組み合わせることができます。ただし、両方の条件を満たしている必要があります。そうでない場合、互いにキャンセルされ、結果が返されません。

さらに、オブジェクトは名前の辞書式順序で返されるため、 FROM 'name_string' は、 STARTS WITH 'name_string' によって返される行よりも辞書式の値が大きい行のみを返します。

例:

  • ... STARTS WITH 'A' LIMIT ... FROM 'B' は結果を返しません。

  • ... STARTS WITH 'B' LIMIT ... FROM 'A' は結果を返しません。

  • ... STARTS WITH 'A' LIMIT ... FROM 'AB' は結果を返します(入力文字列に一致する行がある場合)。

使用上の注意

  • リストに対する USAGE、MODIFY、またはOWNERSHIP 権限を持つロールを使用する場合のみ、リストを表示できます。

  • LIMIT rows の値は 10000 を超えることはできません。LIMIT rows を省略した場合、結果セットが1万行を超えるとコマンドはエラーになります。

    1万件を超える記録が存在する結果を表示するには、 LIMIT rows を含めるか、 Snowflake Information Schema の対応するビューをクエリします。

  • このコマンドの出力を後処理するには、 パイプ演算子->>)または RESULT_SCAN 関数。どちらのコンストラクトも、出力を クエリできる結果セットとして扱います。

    For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.

    When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column type, specify SELECT "type".

    You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.

出力

コマンドの出力では、次の列にリストのプロパティとメタデータが提供されます。

説明

global_name

リストのグローバル名

name

リスト作成時に指定された名前。

title

Title specified in the listing manifest.

subtitle

Sub title specified in the listing manifest.

profile

リストマニフェストで指定されているプロバイダーのプロファイル名。

created_on

リストが作成された日時。

updated_on

リストが最後に更新された日時。

published_on

リストが最後に公開された日時。

state

リストの状態。次のいずれか:

  • DRAFT

  • PUBLISHED

  • UNPUBLISHED

review_state

Review state for public listings only, one of:

  • UNSENT

  • PENDING

  • REJECTED

  • APPROVED

  • CANCELLED

comment

もしあれば、関連コメント。

owner

リスト所有者。

owner_role_type

所有者のロールタイプ。

regions

List of regions where a public listing is available.

target_accounts

ターゲットアカウントのコンマ区切りリスト。

is_monetized

収益化フラグ。

is_application

アプリケーションフラグ。true の場合、リストに Snowflake Native App がアタッチされます。

is_targeted

ターゲットフラグ。

is_limited_trial

Whether the listing is available for limited trial before purchasing.

is_by_request

Whether the listing is a personalized listing.

distribution

Whether the listing is an EXTERNAL or ORGANIZATION listing.

is_mountless_queryable

Whether the listing can be queried by a consumer without mounting using the Uniform Listing Locator (ULL) for the listing.

rejected_on

Date and time when the public listing for approval was last rejected.

organization_profile_name

The profile associated with the ORGANIZATION listing.

uniform_listing_locator

The ULL tha allows consumers to access the organization listing without mounting.

detailed_target_accounts

Private listing target account details with company name included.

compliance_badges

List of compliance certifications that were approved by Snowflake's compliance team for the listing, if any. Available certifications include:

  • SOC2

  • HIPAA

  • ISO27001

MYLISTING で始まる名前のリストをすべて表示:

SHOW LISTINGS LIKE 'MYLISTING%'
Copy

リスト MYLISTING から始まる10件のリストを表示:

SHOW LISTINGS LIMIT 10 FROM 'MYLISTING%'
Copy