diff --git a/src/fondant/components/write_to_file/src/main.py b/src/fondant/components/write_to_file/src/main.py index 3bdb7117..b18cb6ee 100644 --- a/src/fondant/components/write_to_file/src/main.py +++ b/src/fondant/components/write_to_file/src/main.py @@ -21,7 +21,8 @@ def write(self, dataframe: dd.DataFrame) -> None: self.path = self.path + "/export-*.csv" dataframe.to_csv(self.path) elif self.format.lower() == "parquet": - dataframe.to_parquet(self.path) + schema = {field.name: field.type.value for field in self.consumes.values()} + dataframe.to_parquet(self.path, schema=schema, write_metadata_file=True) else: msg = ( f"Not supported file format {self.format}. Writing to file is only "