I get the following error
requirement failed: Provided Maven Coordinates must be in the form 'groupId:artifactId:version'
when I run the command below
spark-submit --class StreamHandler\
--master local[*]\
--packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.5,\
net.snowflake.snowflake-ingest-sdk:0.10.3,\
net.snowflake.snowflake-jdbc.3.13.14\
target/scala-2.11/stream-handler_2.11-1.0.jar
I am trying to consume data using scala and push it to a snowflake sink database. My build.sbt file looks like this
name := "Stream Handler"
version := "1.0"
scalaVersion := "2.11.12"
libraryDependencies = Seq(
"org.apache.spark" %% "spark-core" % "2.4.5" % "provided",
"org.apache.spark" %% "spark-sql" % "2.4.5" % "provided",
"net.snowflake" % "snowflake-ingest-sdk" % "0.10.3",
"net.snowflake" % "snowflake-jdbc" % "3.13.14",
"org.apache.hadoop" % "hadoop-core" % "1.2.0"
//"net.snowflake" % "spark-snowflake" % "2.7.2"
)
Anyone here who has encountered this and can help?
CodePudding user response:
The correct way to specify the packages for Snowflake is:
not:
net.snowflake.snowflake-ingest-sdk:0.10.3
but:
net.snowflake:snowflake-ingest-sdk:0.10.3
where:
<groupId>net.snowflake</groupId>
<artifactId>snowflake-ingest-sdk</artifactId>
<version>0.10.3</version>
Same for JDBC:
net.snowflake:snowflake-jdbc:3.13.14