I need to UNION two datasets in a Code Workbook of Palantir Foundry and I'm not sure how to do that. I want to use Pyspark to do this. I'm new to Foundry, please help!
Asked
Active
Viewed 386 times
1 Answers
5
It's the same way you would use PySpark in any other environment!
If you want to union two datasets with the same schema, say datasetA
and datasetB
, you could do something like
dataset_unioned = datasetA.unionByName(datasetB)
Again, this assumes (and you should probably make sure your data structure abides by this) that your two datasets have the same schema. Checkout the PySpark docs here!

youssefrizk
- 129
- 3