カテゴリ:

システム関数 (システム情報)

SYSTEM$CLIENT_VERSION_INFO

Snowflake クライアントとドライバーのバージョン情報を返します。

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

クライアントバージョンおよびサポートポリシー

構文

SYSTEM$CLIENT_VERSION_INFO()
Copy

引数

なし

戻り値

オブジェクトの JSON 配列を含む文字列を返します。各オブジェクトには、 SnowSQL、 JDBC ドライバーなど、特定のクライアントとドライバーに関する情報が含まれています。

各 JSON オブジェクトには次の名前と値のペアが含まれています。

{
  "clientId": "DOTNETDriver",
  "minimumSupportedVersion": "2.0.4",
  "minimumNearingEndOfSupportVersion": "2.0.7",
  "recommendedVersion": "2.1.2",
  "deprecatedVersions": [],
  "_customSupportedVersions_": []
}
Copy

条件:

clientId

クライアントまたはドライバーの名前。可能な値は次のとおりです。

  • DOTNETDriver

  • GO

  • JDBC

  • JSDriver

  • ODBC

  • PHP

  • PythonConnector

  • SnowSQL

  • SQLAPI

minimumSupportedVersion

公式にサポートされているクライアントまたはドライバーの最も古いバージョン。

minimumNearingEndOfSupportVersion

次の四半期の開始時にサポート終了(EOS)となるクライアントまたはドライバーのバージョン。

recommendedVersion

クライアントまたはドライバーの現在のバージョン。

deprecatedVersions_customSupportedVersions_

内部使用のみ。

使用上の注意

  • JSON を処理したくない場合は、 PARSE_JSONLATERAL FLATTEN 関数を使用して JSON を列出力に変換することができます。

  • また、 WHERE 句を使用して、特定のクライアントやドライバーの情報を返すこともできます(clientId)。

次の例は、すべてのSnowflakeクライアントとドライバーのバージョン情報を取得します。

SELECT SYSTEM$CLIENT_VERSION_INFO();
Copy
[
  {
    "clientId": "DOTNETDriver",
    "minimumSupportedVersion": "2.0.4",
    "minimumNearingEndOfSupportVersion": "2.0.7",
    "recommendedVersion": "2.1.2",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "GO",
    "minimumSupportedVersion": "1.6.0",
    "minimumNearingEndOfSupportVersion": "1.6.3",
    "recommendedVersion": "1.6.25",
    "deprecatedVersions": [],
    "_customSupportedVersions_": ["1.1.5"]
  },
  {
    "clientId": "JDBC",
    "minimumSupportedVersion": "3.13.6",
    "minimumNearingEndOfSupportVersion": "3.13.10",
    "recommendedVersion": "3.14.3",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "JSDriver",
    "minimumSupportedVersion": "1.6.2",
    "minimumNearingEndOfSupportVersion": "1.6.4",
    "recommendedVersion": "1.9.0",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "ODBC",
    "minimumSupportedVersion": "2.23.3",
    "minimumNearingEndOfSupportVersion": "2.24.2",
    "recommendedVersion": "3.1.1",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "PHP",
    "minimumSupportedVersion": "1.1.0",
    "minimumNearingEndOfSupportVersion": "1.2.0",
    "recommendedVersion": "2.1.0",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "PythonConnector",
    "minimumSupportedVersion": "2.5.0",
    "minimumNearingEndOfSupportVersion": "2.7.0",
    "recommendedVersion": "3.4.1",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "SnowSQL",
    "minimumSupportedVersion": "1.2.17",
    "minimumNearingEndOfSupportVersion": "1.2.20",
    "recommendedVersion": "1.2.29",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  },
  {
    "clientId": "SQLAPI",
    "minimumSupportedVersion": "1.0.0",
    "minimumNearingEndOfSupportVersion": "",
    "recommendedVersion": "",
    "deprecatedVersions": [],
    "_customSupportedVersions_": []
  }
]

次の例は、すべてのクライアントのバージョン情報を行セットとして返します。

WITH output AS (
  SELECT
    PARSE_JSON(SYSTEM$CLIENT_VERSION_INFO()) a
)
SELECT
    value:clientId::STRING AS client_id,
    value:minimumSupportedVersion::STRING AS minimum_version,
    value:minimumNearingEndOfSupportVersion::STRING AS near_end_of_support_version,
    value:recommendedVersion::STRING AS recommended_version
  FROM output r,
    LATERAL FLATTEN(INPUT => r.a, MODE =>'array');
Copy
+-----------------+-----------------+-----------------------------+---------------------+
| CLIENT_ID       | MINIMUM_VERSION | NEAR_END_OF_SUPPORT_VERSION | RECOMMENDED_VERSION |
|-----------------+-----------------+-----------------------------+---------------------|
| DOTNETDriver    | 2.0.4           | 2.0.7                       | 2.1.2               |
| GO              | 1.6.0           | 1.6.3                       | 1.6.25              |
| JDBC            | 3.13.6          | 3.13.10                     | 3.14.3              |
| JSDriver        | 1.6.2           | 1.6.4                       | 1.9.0               |
| ODBC            | 2.23.3          | 2.24.2                      | 3.1.1               |
| PHP             | 1.1.0           | 1.2.0                       | 2.1.0               |
| PythonConnector | 2.5.0           | 2.7.0                       | 3.4.1               |
| SnowSQL         | 1.2.17          | 1.2.20                      | 1.2.29              |
| SQLAPI          | 1.0.0           |                             |                     |
+-----------------+-----------------+-----------------------------+---------------------+

次の例は、 JDBC ドライバーのバージョン情報を行セットとして返します。

WITH output AS (
  SELECT
    PARSE_JSON(SYSTEM$CLIENT_VERSION_INFO()) a
)
SELECT
    value:clientId::STRING AS client_id,
    value:minimumSupportedVersion::STRING AS minimum_version,
    value:minimumNearingEndOfSupportVersion::STRING AS near_end_of_support_version,
    value:recommendedVersion::STRING AS recommended_version
  FROM output r,
    LATERAL FLATTEN(INPUT => r.a, MODE =>'array')
  WHERE client_id = 'JDBC';
Copy
+-----------+-----------------+-----------------------------+---------------------+
| CLIENT_ID | MINIMUM_VERSION | NEAR_END_OF_SUPPORT_VERSION | RECOMMENDED_VERSION |
|-----------+-----------------+-----------------------------+---------------------|
| JDBC      | 3.13.6          | 3.13.10                     | 3.14.3              |
+-----------+-----------------+-----------------------------+---------------------+