Dataiku DSS 7 AMA is live! Learn more

How can I avoid dataiku from changing the data types?

Level 1
How can I avoid dataiku from changing the data types?
Hi,

I have a dataset with a field that it's supposed to be a string, the field contains four numbers but sometimes the first number is a cero (like 0999) and dataiku keeps reeding them as numbers even when I declare them as text.

The biggest problem is that when I try to export the dataset, the first cero dissapears. How can I stop this?
0 Kudos
3 Replies
Dataiker
Dataiker
Hi, it is not possible to prevent that if no zero appears in the sample. If a zero-leading number appears in the sample (other than a decimal), DSS should consider it as text automatically.

For some recipes, DSS will automatically propagate the forced "Text"

However, there is a catch with Excel export: Excel export does not currently respect the types, and will always remove the leading zeros. To work around, use CSV export instead of Excel export. Beware that when importing the resulting CSV into Excel, Excel will also remove the leading zero, unless you force "text" format in the Excel import wizard.
0 Kudos
Level 1
Author
Thank you for your answer. I'm actually using CSV export but it still removes the firts zero
0 Kudos
Dataiker
Dataiker

Could you verify this by opening the CSV file with a text editor like notepad, rather than Excel?

0 Kudos
Labels (1)