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

Modified stem cells as a resuscitation serum after death by cyanide poisoning?

RPMs too high on freeway?

Should I tell an editor that I believe an article I'm reviewing is not good enough for the journal?

Why are session states synchronized with high availability?

What is the correct way for pilots to say times?

Is "montäglich" commonly used?

Isn't any conversation with the US president quid-pro-quo?

Beginner Tactics - Why Isn't This Mate?

Why are rain clouds darker?

Buddha Hinduism

Does removing finitely many points from an open set yield an open set?

Translate 主播 in this context

Showing a point on a plot as a circle rather than a disk

Did Ohio pass a law granting students the right to give scientifically wrong answers consistent with their religious beliefs?

Why do we use the particular magnitude of a force to calculate work?

Steampunk book about a bounty hunter teen girl in London

Cage Length (Rear Derallieur) and Total Capacity

Does toddler keep hands around private parts?

Remix compile error: Expected primary expression

TSP with revenue maximization

How can I add an ammeter and/or voltmeter to my home breaker panel?

Twelve Labours #08 - Dark Horse Bookmakers

Which of these will work? HDMI to VGA or HDMI to USB?

Need help reading piano sheet music



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,8351 gold badge16 silver badges29 bronze badges




3,8351 gold badge16 silver badges29 bronze badges










asked Mar 28 at 21:57









riorio

3303 silver badges13 bronze badges




3303 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

Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴