Create dataset in r code
Hi
I have a webapp in Shiny and i would like users to be able to press a button that then create a copy of a dataset that is suffixed with their user name. See code below;
user <- Sys.getenv("USER") dfRules_live <- dkuReadDataset("Rules") dkuWriteDatasetSchema(dfRules_live , paste0("Rules_",user))
However, the error tells me that "Warning: Error in dkuWriteDatasetSchema: Failed to write dataset: dataset does not exist"
I know in a workflow i have to create an empty dataset to populate, but how do i do this in r code?
TIA!
Answers
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 320 Neuron
Hi @Von1974
,The following post describes creating a dataset from Python rather than R but may still be of some help:
Marlan
-
Thanks @Marlan
. This is helpful but there doesn't seem to be a R equivalent for the python function project.create_dataset, not that I can locate anyway! -
@Marlan
looks like i cant do this in R, so ive used the link you sent me to convert the r code to python...now to work out how to reference this python code in the r script to run it!