Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method saveAsBigQueryTable([class java.lang.String]) does not exist: Issue persists even after shading guava dependecies #83

Open
dduran28 opened this issue Apr 13, 2020 · 4 comments
Assignees

Comments

@dduran28
Copy link

dduran28 commented Apr 13, 2020

I am still experiencing the above issue when trying to run the PySpark example in Databricks.

`bq = bigquery.BigQuerySQLContext(session._wrapped._jsqlContext)
bq.setGcpJsonKeyFile(KEY_FILE)
bq.setBigQueryProjectId(BQ_PROJECT_ID)
bq.setGSProjectId(BQ_PROJECT_ID)
bq.setBigQueryGcsBucket(STAGING_BUCKET)
bq.setBigQueryDatasetLocation(DATASET_LOCATION)

bqDF = bigquery.BigQueryDataFrame(df._jdf)
bqDF.saveAsBigQueryTable(
"{0}:{1}.{2}".format(BQ_PROJECT_ID, DATASET_ID, TABLE_NAME)`

gives me the following error

Py4JError: An error occurred while calling o333.saveAsBigQueryTable. Trace:
py4j.Py4JException: Method saveAsBigQueryTable([class java.lang.String]) does not exist
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:341)
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:349)
at py4j.Gateway.invoke(Gateway.java:286)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:251)
at java.lang.Thread.run(Thread.java:748)>

This is my cluster configuration:
image

These are my installed JARs and libraries
image

@dduran28 dduran28 changed the title Method saveAsBigQueryTable([class java.lang.String]): Issue persists even after shading guava dependecies Method saveAsBigQueryTable([class java.lang.String]) does not exist: Issue persists even after shading guava dependecies Apr 13, 2020
@dduran28
Copy link
Author

Bump

@samelamin
Copy link
Owner

Is this still an issue?

@dduran28
Copy link
Author

Yes it is

@samelamin
Copy link
Owner

this is dependant on your cluster, can you let me know where you are running it?

spark version, manually create cluster vs EMR/Databricks/Dataproc

@samelamin samelamin self-assigned this Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants