'How do I write out my Foundry dataset as a .csv? [duplicate]
I want to take my input and match the same number of records per file on my output, i.e. 1 parquet file input = 1 csv file output.
Solution 1:[1]
from transforms.api import transform, Output, Input
@transform(
the_output=Output("my.awesome.output"),
the_input=Input("my.awesome.input"),
)
def my_compute_function(the_input, the_output):
the_output.write_dataframe(
the_input.dataframe(),
output_format="csv"
)
If you want to control file sizing operations, you can use repartition() as needed to control the number of records per file (more detail over here)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | vanhooser |
