Is there a way to parse the contents of the file shares and write to a SQL table? I’m able to copy the .csv
file to a destination (blob, drive) but I’m struggling with the column mapping.
My source is a file share in Azure file and my desired destination in a SQL table. Thanks!
2
To send file from Azure File storage to sql, you can use below design:
split(body('Get_file_content'),decodeUriComponent('%0D%0A'))
Compose 2:
split(first(outputs('Compose')), ',')
Select (Code view/Peek code):
{
"inputs": {
"from": "@outputs('Compose')",
"select": {
"@{outputs('Compose_2')[0]}": "@split(item(), ',')?[0]",
"@{outputs('Compose_2')[1]}": "@split(item(), ',')?[1]"
}
}
}
In Parse Json, set(generate from sample) the output of Select:
Then:
Next action use compose to just show done as output .
Output:
Here, I have converted csv to json manually, there are many connectors which automatically.
For further information also refer SO-Thread1 and SO-Thread2.