Upload 2 or more files in one attempt to adls

prasad k 86 Reputation points
2021-02-15T14:02:26.917+00:00

Hi Team,

Is there anyway to upload or transform multiple files to adls in one attempt(Bulk Upload). If that is not possible any parallel processing feature available??.

Am looking for c# example.
Please advise..

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,501 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,111 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Abdulhakim M. Elrhumi 356 Reputation points
    2021-02-15T17:03:27.27+00:00

    Hi

    private void uploadButton_Click(object sender, EventArgs e)
    {
        var openFileDialog = new OpenFileDialog();
        var dialogResult = openFileDialog.ShowDialog();    
        if (dialogResult != DialogResult.OK) return;              
        Upload(openFileDialog.FileName);
    }
    
    private void Upload(string fileName)
    {
        var client = new WebClient();
        var uri = new Uri("http://www.Mysite.org/UploaderFiles/");
        {
            client.Headers.Add("fileName", System.IO.Path.GetFileName(fileName));
            client.UploadFileAsync(uri, fileName);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
    

    Best Regards.
    Please remember to mark the replies as answers if they help.


  2. deherman-MSFT 37,746 Reputation points Microsoft Employee
    2021-02-16T19:58:34.79+00:00

    @prasad k
    I see you asked the same question on Stack Overflow and have already received an answer. Please review this and see if it resolves your issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.