Export Recipe output folder
![Erlebacher](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar1.png)
I have two Datasets and would like to transform both to csv files. Currently, I execute two `Export Recipe`'s to accomplish this, which requires two separate output folders to store the csv files.
Is it possible to save the two csv files to a single output folder? I cannot figure out how to do this. Thanks.
Operating system used: Mac Ventura
Answers
-
Ignacio_Toledo Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 412 Neuron
Hi @Erlebacher
,As far as I'm aware, DSS flows won't allow you to have two different recipes pointing to the same output folder or dataset. And sadly, the "Export to folder" recipe won't let you select multiple input datasets, neither.
The only solution I have been able to create is to use a python script recipe, as this will allow you to have multiple datasets inputs, and then copy the data as csv in the same output folder.
I can illustrate a solution as shown in this flow:
Where the python code is:
# -*- coding: utf-8 -*- import dataiku import pandas as pd, numpy as np from dataiku import pandasutils as pdu # Read recipe inputs MMEX = dataiku.Dataset("MMEX") MMEX_df = MMEX.get_dataframe() SBEX = dataiku.Dataset("SBEX") SBEX_df = SBEX.get_dataframe() store_data = dataiku.Folder("store_data") store_data_path = store_data.get_path() MMEX_df.to_csv(f'{store_data_path}/mmex.csv') SBEX_df.to_csv(f'{store_data_path}/sbex.csv')
Maybe there is another solution I'm not aware of, but I hope this helps meanwhile.