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

Add example of Caching Dataframe in SparkSqlJob #308

Open
fadeddata opened this Issue Nov 10, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@fadeddata

fadeddata commented Nov 10, 2015

Is there an example of how to share a cached Dataframe between jobs using SparkSqlJob?
https://gist.github.com/fadeddata/ad8c55f286bd5bf4eeba
Is this even possible?
I tried to convert a Dataframe to an RDD and used NamedRdd to cache it but that ended up with a job that never completed.

@velvia

This comment has been minimized.

Show comment
Hide comment
@velvia

velvia Nov 10, 2015

Contributor

@fadeddata what you are missing, I believe, is a data.registerTempTable("something??"). Then, in your QueryJob, you can do sc.table("something??") to retrieve it. You can optionally also do sc.cacheTable("something??") which keeps the entire table in an efficient in-memory columnar format.

You are right that we probably should have an example documented somewhere, so I'll turn this into some kind of example in the repo.

Contributor

velvia commented Nov 10, 2015

@fadeddata what you are missing, I believe, is a data.registerTempTable("something??"). Then, in your QueryJob, you can do sc.table("something??") to retrieve it. You can optionally also do sc.cacheTable("something??") which keeps the entire table in an efficient in-memory columnar format.

You are right that we probably should have an example documented somewhere, so I'll turn this into some kind of example in the repo.

@velvia velvia changed the title from Caching Dataframe to Add example of Caching Dataframe in SparkSqlJob Nov 10, 2015

@velvia velvia added this to the 0.6.1 milestone Nov 10, 2015

@velvia velvia modified the milestones: 0.6.1, 0.7.0 Dec 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment