Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
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
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.