- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
AttributeError: Dataframe has no attribute bucketBy
- Labels:
-
Apache Spark
Created on ‎12-27-2017 05:48 AM - edited ‎09-16-2022 05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created ‎12-27-2017 05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created on ‎12-27-2017 06:10 AM - edited ‎12-27-2017 06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry , there was a typo, the code I am trying to run is :-
df.write.bucketBy(2,"col_name").saveAsTable("table")
