what is the best way to deal with a lot of dataset of different type (case classes)How to define partitioning of DataFrame?Parallelize GZip file processing SparkHow to read a parquet file with lots of columns to a Dataset without a custom case class?Scala 2.11 & Spark 2.0.0 Create dynamically case class to encode DatasetHow to call Spark UDF on Datasets of case classes?Spark SQL - Read csv into Dataset[T] where T is a case class of Option[BigDecimal] fieldAvro Schema vs. Scala Case Class for Spark DatasetsStream files from HDFS using Apache Spark SteamingHow to create merge-sorted partitions in Sparkspark convert dataframe to dataset using case class with option fields

Warranty on lock damaged during attempted theft

Driving distance between O'Hare (ORD) and Downtown Chicago is 20.5 mi and 1H 17min?

How prevalent is the sound /ʑ:/ in Russian?

Simplify makes Mathematica forget that a matrix is Hermitian

Will an administrator exceed the 401K limit?

Interview question: If correlation doesn't imply causation, how do you detect causation?

Is it possible to use gases instead of liquids as fuel in a rocket engine?

What is the 12th Russian exception verb?

A randomized encryption program

How to implement the five star notation in Latex

If Space Shuttle flies "like a brick", why does it need the wings?

Paying to leave without notice in at-will employment state

Coordinate entry in QGIS 3

How can I find replacement part for Mongoose scooter?

Bo Derek in texbook.tex?

Why do airline tickets have titles in addition to names?

Seeing the ground from the shuttle before launch?

Identify the Eeveelutions

How do I experimentally measure the surface area of a rock?

Is it possible to get reverse life insurance?

Average Two Letters

How to determine the degree to which diminished seventh chords and half-diminished seventh chords belong in major scales?

What is the meaning of 奥手 here?

When the direction of a movement changes, is the object at rest at some time?



what is the best way to deal with a lot of dataset of different type (case classes)


How to define partitioning of DataFrame?Parallelize GZip file processing SparkHow to read a parquet file with lots of columns to a Dataset without a custom case class?Scala 2.11 & Spark 2.0.0 Create dynamically case class to encode DatasetHow to call Spark UDF on Datasets of case classes?Spark SQL - Read csv into Dataset[T] where T is a case class of Option[BigDecimal] fieldAvro Schema vs. Scala Case Class for Spark DatasetsStream files from HDFS using Apache Spark SteamingHow to create merge-sorted partitions in Sparkspark convert dataframe to dataset using case class with option fields






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0

















I have like 50+ different case classes and each one is bound to a different parquet source



val cc1ds = spark.read("/hdfs/input1").as[cc1]
val cc2ds = spark.read("/hdfs/input1").as[cc2]
...
val cc50ds = spark.read("/hdfs/input1").as[cc50]


how to handle them in case of need to process them?
I cannot use



val res:(dataset[cc1], ... dataset[cc50]) = (cc1ds, ... cc50ds)


and I would like to avoid having so many vals defined










share|improve this question























  • 1





    Are they all different schema ?

    – howie
    Mar 28 at 22:00











  • yes 50 + different parquet with different schema

    – rio
    Apr 4 at 21:34











  • usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

    – rio
    Apr 4 at 21:35


















0

















I have like 50+ different case classes and each one is bound to a different parquet source



val cc1ds = spark.read("/hdfs/input1").as[cc1]
val cc2ds = spark.read("/hdfs/input1").as[cc2]
...
val cc50ds = spark.read("/hdfs/input1").as[cc50]


how to handle them in case of need to process them?
I cannot use



val res:(dataset[cc1], ... dataset[cc50]) = (cc1ds, ... cc50ds)


and I would like to avoid having so many vals defined










share|improve this question























  • 1





    Are they all different schema ?

    – howie
    Mar 28 at 22:00











  • yes 50 + different parquet with different schema

    – rio
    Apr 4 at 21:34











  • usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

    – rio
    Apr 4 at 21:35














0












0








0








I have like 50+ different case classes and each one is bound to a different parquet source



val cc1ds = spark.read("/hdfs/input1").as[cc1]
val cc2ds = spark.read("/hdfs/input1").as[cc2]
...
val cc50ds = spark.read("/hdfs/input1").as[cc50]


how to handle them in case of need to process them?
I cannot use



val res:(dataset[cc1], ... dataset[cc50]) = (cc1ds, ... cc50ds)


and I would like to avoid having so many vals defined










share|improve this question

















I have like 50+ different case classes and each one is bound to a different parquet source



val cc1ds = spark.read("/hdfs/input1").as[cc1]
val cc2ds = spark.read("/hdfs/input1").as[cc2]
...
val cc50ds = spark.read("/hdfs/input1").as[cc50]


how to handle them in case of need to process them?
I cannot use



val res:(dataset[cc1], ... dataset[cc50]) = (cc1ds, ... cc50ds)


and I would like to avoid having so many vals defined







apache-spark apache-spark-sql apache-spark-dataset






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 22:08









Roberto Congiu

3,8251 gold badge16 silver badges29 bronze badges




3,8251 gold badge16 silver badges29 bronze badges










asked Mar 28 at 21:57









riorio

3053 silver badges13 bronze badges




3053 silver badges13 bronze badges










  • 1





    Are they all different schema ?

    – howie
    Mar 28 at 22:00











  • yes 50 + different parquet with different schema

    – rio
    Apr 4 at 21:34











  • usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

    – rio
    Apr 4 at 21:35













  • 1





    Are they all different schema ?

    – howie
    Mar 28 at 22:00











  • yes 50 + different parquet with different schema

    – rio
    Apr 4 at 21:34











  • usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

    – rio
    Apr 4 at 21:35








1




1





Are they all different schema ?

– howie
Mar 28 at 22:00





Are they all different schema ?

– howie
Mar 28 at 22:00













yes 50 + different parquet with different schema

– rio
Apr 4 at 21:34





yes 50 + different parquet with different schema

– rio
Apr 4 at 21:34













usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

– rio
Apr 4 at 21:35






usually when I have a few I use a def and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```

– rio
Apr 4 at 21:35













0






active

oldest

votes













Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407462%2fwhat-is-the-best-way-to-deal-with-a-lot-of-dataset-of-different-type-case-class%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407462%2fwhat-is-the-best-way-to-deal-with-a-lot-of-dataset-of-different-type-case-class%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript