Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

AttributeError: Dataframe has no attribute bucketBy

AttributeError: Dataframe has no attribute bucketBy

New Contributor

In spark 2.2.0,  I am trying to create table using bucketBy(), but not able to do so. it throws error message :-

AttributeError: Dataframe has no  attribute bucketBy

code:- df.write.bucketBy.saveAsTable("table")

 

any solution?

2 REPLIES 2
Highlighted

Re: AttributeError: Dataframe has no attribute bucketBy

Master Collaborator

Not sure what you're trying to do there, but looks like you have a simple syntax error. bucketBy is a method. Please start with the API docs first.

Re: AttributeError: Dataframe has no attribute bucketBy

New Contributor

sorry , there was a typo, the code I am trying to run is :-
df.write.bucketBy(2,"col_name").saveAsTable("table")

Don't have an account?
Coming from Hortonworks? Activate your account here