1

This is the following use case:

I have different csv files from my data lake and want to copy this to my Azure SQL DB. a typical file name of the csv looks like this : Sale-Internet-Header.csv.

In the Sink property of Azure SQL DB i used the expression in the sink dataset @replace(item().name, '-','_'). After execute the copy pipeline the sql table has the following name: dbo.sales_internet_header.csv

I would like to change my expression in the sink dataset to remove the ".csv" so that the SQL table name going to look like : dbo.sales_internet_header

Any suggestions?

Many thanks

1 Answer 1

0

You can use replace() and add dynamic content @replace(variables('cc'),'.csv', '') remove the ".csv".

Give this dynamic content in the SQL dataset table name or inside ForEach as above. Here is the sample demonstration that where I have used set variable to replace the .csv.

enter image description here

enter image description here

Output:

enter image description here

1
  • Thanks for your response, but unfortunatly using your expression @replace(variables('cc'),'.csv', '') it returns only the following sql table name : dbo.Sale-Internet-Header. i was expecting to have this result : dbo.Sale_Internet_Header.
    – Regazzi
    Commented Oct 20, 2022 at 15:29

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.