Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on January 28, 2017 12:29AM
Likes: 0
Replies: 2
One way of doing this is by using a python recipe on the dataset you wish to export, with a folder as output. In the recipe you can use the following code:
# -*- coding: utf-8 -*-
import dataiku
import pandas as pd, numpy as np
from dataiku import pandasutils as pdu
# Recipe inputs
input_dataset_name = dataiku.Dataset("input_dataset_name")
input_dataset_name_df = input_dataset_name.get_dataframe()
# Recipe outputs
folder_name = dataiku.Folder("folder_id")
folder_name_path = folder_name.get_path()
import time
current_day = time.strftime("%Y-%m-%d")
input_dataset_name_df.to_csv(path_or_buf=folder_name_path+"export_"+current_day+".csv", index=False)
Note that the first lines (input dataset, output folder etc) are all generated by DSS. So you should only add the last 3 lines of this code to your recipe, and change "input_dataset_name_df" and "folder_name_path" with the proper name.
Hi,
is there a way how to solve this issue without python code? I have similar situation in which a file is exported with a suffix based on local variable. However this flow will be operated by a Data Analyst, hence I don't want to use any python code.
Many thanks,
Romana