カテゴリ:

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

SYSTEM$CLIENT_VERSION_INFO

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

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

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

構文

SYSTEM$CLIENT_VERSION_INFO() 
Copy

引数

なし

戻り値

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

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

{  "clientId": "DOTNETDriver",  "clientAppId": ".NET",  "minimumSupportedVersion": "2.0.9",  "minimumNearingEndOfSupportVersion": "2.0.11",  "recommendedVersion": "2.1.5",  "deprecatedVersions": [],  "_customSupportedVersions_": [] }, 
Copy

条件:

clientId

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

  • DOTNETDriver

  • GO

  • JDBC

  • JSDriver

  • ODBC

  • PHP_PDO

  • PythonConnector

  • SnowSQL

  • SQLAPI

clientAppId

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

  • .NET

  • GO

  • JDBC

  • JavaScript

  • ODBC

  • PDO

  • 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",  "clientAppId": ".NET",  "minimumSupportedVersion": "2.0.9",  "minimumNearingEndOfSupportVersion": "2.0.11",  "recommendedVersion": "2.1.5",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "GO",  "clientAppId": "Go",  "minimumSupportedVersion": "1.6.6",  "minimumNearingEndOfSupportVersion": "1.6.9",  "recommendedVersion": "1.7.1",  "deprecatedVersions": [],  "_customSupportedVersions_": [  "1.1.5"  ]  },  {  "clientId": "JDBC",  "clientAppId": "JDBC",  "minimumSupportedVersion": "3.13.14",  "minimumNearingEndOfSupportVersion": "3.13.18",  "recommendedVersion": "3.14.4",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "JSDriver",  "clientAppId": "JavaScript",  "minimumSupportedVersion": "1.6.6",  "minimumNearingEndOfSupportVersion": "1.6.9",  "recommendedVersion": "1.9.2",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "ODBC",  "clientAppId": "ODBC",  "minimumSupportedVersion": "2.24.5",  "minimumNearingEndOfSupportVersion": "2.24.7",  "recommendedVersion": "3.1.4",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "PHP_PDO",  "clientAppId": "PDO",  "minimumSupportedVersion": "1.2.0",  "minimumNearingEndOfSupportVersion": "1.2.1",  "recommendedVersion": "2.0.1",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "PythonConnector",  "clientAppId": "PythonConnector",  "minimumSupportedVersion": "2.7.3",  "minimumNearingEndOfSupportVersion": "2.7.7",  "recommendedVersion": "3.6.0",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "SnowSQL",  "clientAppId": "SnowSQL",  "minimumSupportedVersion": "1.2.21",  "minimumNearingEndOfSupportVersion": "1.2.21",  "recommendedVersion": "1.2.31",  "deprecatedVersions": [],  "_customSupportedVersions_": []  },  {  "clientId": "SQLAPI",  "clientAppId": "SQLAPI",  "minimumSupportedVersion": "1.0.0",  "minimumNearingEndOfSupportVersion": "",  "recommendedVersion": "",  "deprecatedVersions": [],  "_customSupportedVersions_": []  } ] 

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

WITH output AS ( SELECT PARSE_JSON(SYSTEM$CLIENT_VERSION_INFO()) a ) SELECT value:clientAppId::STRING AS client_app_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_APP_ID | MINIMUM_VERSION | NEAR_END_OF_SUPPORT_VERSION | RECOMMENDED_VERSION | |-----------------+-----------------+-----------------------------+---------------------| | .NET | 2.0.9 | 2.0.11 | 2.1.5 | | Go | 1.6.6 | 1.6.9 | 1.7.1 | | JDBC | 3.13.14 | 3.13.18 | 3.14.4 | | JavaScript | 1.6.6 | 1.6.9 | 1.9.2 | | ODBC | 2.23.5 | 2.24.7 | 3.1.4 | | PDO | 1.2.0 | 1.2.1 | 2.0.1 | | PythonConnector | 2.7.3 | 2.7.7 | 3.6.0 | | SnowSQL | 1.2.21 | 1.2.21 | 1.2.31 | | 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.14 | 3.13.18 | 3.14.4 | +-----------+-----------------+-----------------------------+---------------------+