Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

Force an output dataset column as string with R.

davido
Level 1
Force an output dataset column as string with R.
Hi,



How do you proceed to force a column detected as int in a R script to as string in output in order to preserve a specific format . Example : input = 06000 give an output dataset = 6000, and i would i input = 06000 which should give an output = 06000.
0 Kudos
1 Reply
Clément_Stenac
Dataiker
Dataiker
Hi,

Good news, the latest version of DSS (3.1) now includes this feature.

You can either:

* Force the dataframe to respect the storage schema of the DSS dataset by using

dkuReadDataset("mydataset", inferColClassesFromData=FALSE)

* Force the col class for a set of columns:

dkuReadDataset("mydataset", colClasses=c(mycolumn = "character"))
0 Kudos

Labels

?
Labels (3)
A banner prompting to get Dataiku