Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Removing .csv from @item().name in ADF

In my Sink Table Name, I have the below paremeter:

@item().name

but it is creating the table as xxxxx.csv

What can I do to get rid of the .csv portion of the itemname when creating the sink table parameter. I found that I need to use Split() but it didn’t work for me:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Split(@item().name,".",1)

Please note that I can’t use substring because the parameter will refer to different table names with different lengths. So my approach was to look at the as a separator and extract the characters before it as my table name.

>Solution :

I have reproduced the issue and the dynamic content you are using has incorrect syntax.

  • This is a sample array that I have taken.
[{"name":"file1.csv"},{"name":"file2.csv"}]
  • Inside for each, in a set variable activity, I used the following to extract just the filename (without ‘.csv’).
@split(item().name,'.')[0]

enter image description here

  • The following is the debug output:

enter image description here

  • So, please change the dynamic content to @split(item().name,'.')[0].
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading