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

Create DataSet using SparkSession #26

Open
santhoshtangudu opened this issue Jun 26, 2017 · 1 comment
Open

Create DataSet using SparkSession #26

santhoshtangudu opened this issue Jun 26, 2017 · 1 comment

Comments

@santhoshtangudu
Copy link

Hi,
We have 4mc format files in my Hadoop cluster. We are trying to read these files and create DataSet (instead of creating RDD and then DataSet) in spark-2.0. Can you please us to do the same?

@carlomedas
Copy link
Collaborator

For sure there are several methods to achieve that, and to be honest I'm not sure I'm giving you best solution. Unfortunately at this time I don't have time to dig deeper, but:
what about, you load the RDD using a SQLContext, which could be pre-filtered etc etc, then you create a bean class that can be used to quickly map to Dataset by leveraging convention over configuration, like e.g:
Dataset devices = sqlContext.createDataFrame(ratingsRDD, DeviceEntry.class);

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