Export Recipe output folder

Erlebacher
Level 4
Export Recipe output folder

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

0 Kudos
1 Reply
Ignacio_Toledo

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:

 

Screenshot from 2022-12-16 19-41-12.png

 

 

 

 

 

 

 

 

 

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.

0 Kudos