trim 0 values from beginning

arkiboys 9,516 Reputation points
2022-06-08T09:30:51.313+00:00

How is it possible to remove the beginning 0 values from a string in dataflow?
for example:
43255
5656poppp
00005443
008787
...

It should give:
43255
5656poppp
5443
8787
...

Thank you

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,341 questions
0 comments No comments
{count} votes

Accepted answer
  1. Suba Balaji 11,186 Reputation points
    2022-06-08T14:53:58.077+00:00

    Hi @arkiboys ,

    we can use ltrim(stringcolumnname,'0')

    Please check the below image, on right hand side you see my original values and left hand side trimmed values. Hope it helps. Let us know how it goes,

    209526-screenshot-2022-06-08-at-82155-pm.png

    Thanks

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Samy Abdul 3,366 Reputation points
    2022-06-08T10:44:19.21+00:00

    Hi @arkiboys , using length function and substring function should get you there, something along the lines below for example:

    @substring('helloworld',0,sub(length('helloworld'),3)) Thanks