Leading zeros truncated! Datatype changing
Hello Community,
I'm facing an issue that, I've a column in a dataset for which data type is a string and the meaning type is text and when I shared this to another project data type hasn't changed but it's truncated the leading zeros! thus the meaning is returned as integer. How can I not lose leading zeros without using any recipe as i'm just sharing the dataset in other project!!
Thanks You in Advance! Much appreciated if any of you help me out on this!
Answers
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker
Hi @jp1
,
You could append a character to your column and thus transform these to e.g. z0001124 thus it will always be treated as a string even if inferred further upstream in your flow.
Thanks, -
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
here are some other posts on Dataiku.com that could be helpful.
https://community.dataiku.com/t5/Knowledge-Base/How-to-pad-a-number-with-leading-zeros/tac-p/10807
https://community.dataiku.com/t5/Using-Dataiku/not-getting-exact-value/td-p/34193