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;
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
add a comment
|
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
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 adef
and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```
– rio
Apr 4 at 21:35
add a comment
|
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
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
apache-spark apache-spark-sql apache-spark-dataset
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 adef
and return a tuple ex ``` val (ds1,ds2, ds3) = getDS ```
– rio
Apr 4 at 21:35
add a comment
|
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 adef
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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