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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현