Export Recipe output folder

Options
Erlebacher
Erlebacher Registered Posts: 82 ✭✭

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

Tagged:

Answers

  • Ignacio_Toledo
    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: 411 Neuron
    edited July 17
    Options

    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.

Setup Info
    Tags
      Help me…