Importing RData Files in DataIku

Options
OrsonWelles
OrsonWelles Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 3 ✭✭✭

Hi,

Is it possible to import from an RData file (usually with extension . rdata or . rda) a DataIku dataset ?.

If not what is the proper way to deal with .rda files and integrate them in a flow ?

Thanks in advance. Best Jean-Daniel

Tagged:

Best Answer

  • AlexandreL
    AlexandreL Dataiker Posts: 36 Dataiker
    Answer ✓
    Options

    Hi,

    RData is not a table and needs to be loaded prior to extracting the table you need to write in your dataset, so there is no builtin way to do it.

    However, you can create a managed folder on your flow in which you can store your RData file. From this folder, create an R recipe that takes your folder as input, and a dataset as output. The code in your R recipe should look like this:

    # Load R Datar_folder <- dkuManagedFolderPath("folder_id")path <- paste(r_folder, 'filename.rda', sep="/")load(path)# Get the dataframe of interestdf = dataframe_of_interestdkuWriteDataset(df,"dataset_name")

    Where folder_id is your input folder's id, dataframe_of_interest is the name of your dataset when it was saved in your .rda file, and dataset_name is the name of your recipe's output dataset.

Answers

  • OrsonWelles
    OrsonWelles Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 3 ✭✭✭
    Options

    Dear AlexanderL,

    It works like a charm. Great Explanation. Managed Folder is a Nice feature I had not thought of.

    Thanks, Best Jean-Daniel

Setup Info
    Tags
      Help me…