SHOW LISTINGS¶
アクセスする権限がある リスト をリスト表示します。コマンドを実行しているユーザーがリストに対して USAGE、MODIFY、OWNERSHIP のいずれかを持つリストのみを表示します。
- こちらもご参照ください。
CREATE LISTING、 ALTER LISTING、 DESCRIBE LISTING、 DROP LISTING
構文¶
SHOW LISTINGS [ LIKE '<pattern>' ]
[ STARTS WITH '<name_string>' ]
[ LIMIT <rows> [ FROM '<name_string>' ] ]
オプションのパラメーター¶
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, specifySELECT "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.
出力¶
コマンドの出力では、次の列にリストのプロパティとメタデータが提供されます。
列 |
説明 |
|
リストのグローバル名 |
|
リスト作成時に指定された名前。 |
|
Title specified in the listing manifest. |
|
Sub title specified in the listing manifest. |
|
リストマニフェストで指定されているプロバイダーのプロファイル名。 |
|
リストが作成された日時。 |
|
リストが最後に更新された日時。 |
|
リストが最後に公開された日時。 |
|
リストの状態。次のいずれか:
|
|
Review state for public listings only, one of:
|
|
もしあれば、関連コメント。 |
|
リスト所有者。 |
|
所有者のロールタイプ。 |
|
List of regions where a public listing is available. |
|
ターゲットアカウントのコンマ区切りリスト。 |
|
収益化フラグ。 |
|
アプリケーションフラグ。 |
|
ターゲットフラグ。 |
|
Whether the listing is available for limited trial before purchasing. |
|
Whether the listing is a personalized listing. |
|
Whether the listing is an EXTERNAL or ORGANIZATION listing. |
|
Whether the listing can be queried by a consumer without mounting using the Uniform Listing Locator (ULL) for the listing. |
|
Date and time when the public listing for approval was last rejected. |
|
The profile associated with the ORGANIZATION listing. |
|
The ULL tha allows consumers to access the organization listing without mounting. |
|
Private listing target account details with company name included. |
|
List of compliance certifications that were approved by Snowflake's compliance team for the listing, if any. Available certifications include:
|
例¶
MYLISTING で始まる名前のリストをすべて表示:
SHOW LISTINGS LIKE 'MYLISTING%'
リスト MYLISTING から始まる10件のリストを表示:
SHOW LISTINGS LIMIT 10 FROM 'MYLISTING%'