0

我正在与 Kafka 合作并尝试将雪花与它连接,但它没有连接。它给出了某种区域错误,服务器和集群应该在同一个区域,我在本地 Kafka 上尝试过并且不接受“snowflake.url.name”。

这是分布式模式下的配置文件。

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '
{
  "name":"XYZCompanySensorData",
  "config":{
    "connector.class":"com.snowflake.kafka.connector.SnowflakeSinkConnector",
    "tasks.max":"2",
    "topics":"MysqlJConfluent.source.user_details",
    "buffer.count.records":"10000",
    "buffer.flush.time":"60",
    "buffer.size.bytes":"5000000",
    "snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com",
    "snowflake.user.name":"********",
    "snowflake.private.key":"********************************************",
    "snowflake.database.name":"DEMO_DB",
    "snowflake.schema.name":"PUBLIC",
    "key.converter":"org.apache.kafka.connect.storage.StringConverter",
    "value.converter":"com.snowflake.kafka.connector.records.SnowflakeAvroConverter"
  }
}'

日志文件:

HTTP/1.1 100 Continue

HTTP/1.1 400 Bad Request
Date: Wed, 28 Apr 2021 11:50:41 GMT
Content-Type: application/json
Content-Length: 368
Server: Jetty(9.4.33.v20201020)

{"error_code":400,"message":"Connector configuration is invalid and contains the following 3 error(s):\nsnowflake.url.name: Cannot connect to Snowflake\nsnowflake.user.name: Cannot connect to Snowflake\nsnowflake.private.key: Cannot connect to Snowflake\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"}

请让我知道如何连接。

4

1 回答 1

0

这一行:

"snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com

表明你没有关闭引号,它应该是这样的:

"snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com:443"
于 2021-04-29T07:22:35.330 回答