0

この質問を参照して、埋め込まれた接続資格情報を抽出しようとしています。しかし、次のエラーが発生します。

import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.types._  //import everything from the package    
import org.apache.spark.sql.expressions.{Window => W} 
import org.apache.spark.sql.{functions => F}
import org.apache.spark.SparkContext
import com.amazonaws.services.glue.GlueContext
import com.amazonaws.services.glue.util.GlueArgParser 

import com.amazonaws.services.glue.DynamicFrame

import com.amazonaws.regions.Regions
import com.amazonaws.services.glue.model._

import com.amazonaws.services.glue.{AWSGlue, AWSGlueClient}
import scala.collection.JavaConverters.{mapAsJavaMapConverter, seqAsJavaListConverter}
import com.amazonaws.services.sagemaker.sparksdk.IAMRole

val sc = spark.sparkContext
val glueContext: GlueContext = new GlueContext(sc)

val region = Regions.fromName("us-east-1")

// Function to create AWS glue client
def glueClient(region: Regions):
AWSGlue = AWSGlueClient.builder().withRegion(region).build()

val glue = glueClient(region =region)

glue.getConnection("{Name: name-of-embedded-connection,HidePassword: False}")

エラーが発生しました: :71: エラー: タイプの不一致。見つかった: 文字列("{名前: preprod-samtec-redw,HidePassword: False}") 必須: com.amazonaws.services.glue.model.GetConnectionRequest glue.getConnection("{名前: 埋め込み接続の名前,HidePassword : 間違い}")

4

1 に答える 1