Snowflake connector "Cannot connect to Snowflake"

1.1k Views Asked by At

I was working with Kafka and try to connect snowflake with it but it's not connecting. It gives some kind of regional error that the server and cluster should be on the same region, and I tried it on local Kafka and did not accept the "snowflake.url.name".

here is the config file in distributed mode.

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"
  }
}'

Log file :

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`"}

Please let me know how can I connect.

1

There are 1 best solutions below

2
On

This line:

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

shows that you're not closing the quotes, and it should be like this:

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