Reputation: 1
I have to 2 Datasets:
It is a bijective relationship between A and B
Can I nest the 2 together into one datasets that way when it is converted to a json object there is just an interior object that represents that element row from dataset B.
The end product should be
{
Dataset-A
{
Dataset-B-Object
}
}
Upvotes: 0
Views: 270
Reputation: 117
No way in hell you can do that. We are talking about Spark, not some web APIs that you want to create from the dataset.
You can union the two dataset in one dataset
datasetA.union(datasetB)
and the result will be one dataset joined together.
Upvotes: 1