Comments (6)
Unable to import Module..
import com.samelamin.spark.bigquery._
Import ERROR
in python files..
from spark-bigquery.
This sounds like a bug that was fixed with the latest release, can you confirm what version you are using?
from spark-bigquery.
I picked 2.6.0 and built an uber jar. Still doesn't work. Read and Write, both throwing same error
My Jar size: 15710607 Apr 29 15:49 sparkbigquery-0.0.1-SNAPSHOT.jar (this is a wrapper jar. I built it so that I can have a big uber jar & incl all)
Read:
scala> val df = spark.sqlContext.read.format("com.samelamin.spark.bigquery").option("tableReferenceSource","projectid:schema.table").load()
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at com.google.cloud.hadoop.io.bigquery.BigQueryStrings.parseTableReference(BigQueryStrings.java:68)
at com.samelamin.spark.bigquery.BigQueryRelation.getConvertedSchema(BigQueryRelation.scala:19)
at com.samelamin.spark.bigquery.BigQueryRelation.schema(BigQueryRelation.scala:13)
at org.apache.spark.sql.execution.datasources.LogicalRelation.(LogicalRelation.scala:40)
at org.apache.spark.sql.SparkSession.baseRelationToDataFrame(SparkSession.scala:389)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:146)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:125)
Write:
scala> avrodf.saveAsBigQueryTable("projectid:schema.table")
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at com.google.cloud.hadoop.io.bigquery.BigQueryStrings.parseTableReference(BigQueryStrings.java:68)
at com.samelamin.spark.bigquery.BigQueryDataFrame.saveAsBigQueryTable(BigQueryDataFrame.scala:40)
... 50 elided
guava: 26.0
jdk1.8
Please help us. This seems to be a great api. very promising to use and easiness.
from spark-bigquery.
This sounds like a bug that was fixed with the latest release, can you confirm what version you are using?
2.6.0 also has this error. ShowStopper.
from spark-bigquery.
I was able to get this resolved by shading the google libraries.
<configuration>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>shaded.guava</shadedPattern>
<includes>
<include>com.google.**</include>
</includes>
<excludes>
<exclude>com.google.common.base.Optional</exclude>
<exclude>com.google.common.base.Absent</exclude>
<exclude>com.google.common.base.Present</exclude>
<exclude>com.google.cloud.**</exclude>
</excludes>
</relocation>
</relocations>
</configuration>
from spark-bigquery.
Cheers for adding the example @ameyamahajan I would really appreciate it if you add a ToDo section in the readme :)
from spark-bigquery.
Related Issues (20)
- class cast exception has occurs (Double cannot be cast to Float) HOT 3
- Using spark-bigquery connector in AWS EMR Zeppelin HOT 4
- java.lang.ClassCastException: java.lang.Long cannot be cast to java.sql.Timestamp HOT 1
- Write to bigquery using DataframeWriter HOT 2
- runDMLQuery on AWS Glue throws an exception because of Jersey libraries conflict HOT 1
- read table second time show error Conflict occurred creating export directory HOT 1
- Error when changing zone to something other than EU/US HOT 3
- DML query drop and create table takes time HOT 3
- Utilize Bigquery Storage API HOT 2
- getting java.lang.NoSuchMethodError on saveAsBigQueryTable HOT 1
- Exception in thread "main" java.lang.NoSuchMethodError: HOT 14
- Give content of JSON credentials instead of path to it HOT 2
- Big query export from GCP to AWS S3 using Spark HOT 2
- saveAsBigQueryTable exception with StructType column HOT 1
- Export FS must derive from GoogleHadoopFileSystemBase HOT 1
- writing to bigquery from dataproc HOT 1
- Method saveAsBigQueryTable([class java.lang.String]) does not exist: Issue persists even after shading guava dependecies HOT 4
- Conflict occurred creating export directory already exists HOT 1
- 404 not found: Job <job name> not found error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-bigquery.