watsonx.data と IBM Cloud (Analytics Engine powered by Apache Spark) の統合
Analytics Engine powered by Apache Sparkをwatsonx.dataと統合できます(IBM Cloud上)。
始める前に
IBM Cloudで watsonx.data 用に Spark 搭載の Analytics Engine インスタンスを構成するには、その前に以下を行う必要があります。
- IBM Cloudで watsonx.data インスタンスをプロビジョンします。 詳しくは、 watsonx.dataの概要を参照してください。
- Cloud Pak for Data を Analytics Engine powered Apache Sparkとともにインストールします。 詳しくは、インストール Analytics Engine powered by Apache Sparkを参照してください。
- Analytics Engine powered by Apache Spark サービスのインスタンスをプロビジョンします。 「インスタンスのプロビジョニング」 を参照してください。
手順
Analytics Engine powered by Apache Spark インスタンスを watsonx.data インスタンスで構成します。
Analytics Engine powered by Apache Spark インスタンスのデフォルト構成を設定するためのアクセス・トークンを生成します。 API 許可トークンの生成を参照してください。
API を実行して、インスタンスのデフォルト構成を設定します。
c. curl -X PATCH --location --header "Authorization: ZenApiKey ${TOKEN}" --header "Accept: application/json" --header "Content-Type: application/merge-patch+json" --data '{ d. <CONFIGURATION_DETAILS> }' "<https://<CloudPakforData_URL>/v4/analytics_engines/<INSTANCE_ID>/default_configs"CONFIGURATION_DETAILS: 以下の構成の詳細をコピーし、以下の値を置き換えます。
<hms-thrift-endpoint-from-watsonx.data>: watsonx.dataの資格情報を指定します。<hms-user-from-watsonx.data>: watsonx.data ユーザー名。<hms-password-from-watsonx.data>: watsonx.data パスワード。
{ "spark.sql.catalogImplementation": "hive", "spark.driver.extraClassPath": "/opt/ibm/connectors/iceberg-lakehouse/iceberg-3.3.2-1.2.1-hms-4.0.0-shaded.jar", "spark.sql.extensions": "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions", "spark.sql.iceberg.vectorization.enabled": "false", "spark.sql.catalog.lakehouse": "org.apache.iceberg.spark.SparkCatalog", "spark.sql.catalog.lakehouse.type": "hive", "spark.sql.catalog.lakehouse.uri": "<hms-thrift-endpoint-from-watsonx.data> for example (thrift://81823aaf-8a88-4bee-a0a1-6e76a42dc833.cfjag3sf0s5o87astjo0.databases.appdomain.cloud:32683) ", "spark.hive.metastore.client.auth.mode": "PLAIN", "spark.hive.metastore.client.plain.username": "<hms-user-from-watsonx.data> (for example, ibmlhapikey)", "spark.hive.metastore.client.plain.password": "<hms-password-from-watsonx.data>", "spark.hive.metastore.use.SSL": "true", "spark.hive.metastore.truststore.type": "JKS", "spark.hive.metastore.truststore.path": "file:///opt/ibm/jdk/lib/security/cacerts", "spark.hive.metastore.truststore.password": "changeit" }