title: How to use Wildcard Filenames in Azure Data Factory SFTP?
body: <p>I am using Data Factory V2 and have a dataset created that is located in a third-party SFTP. The SFTP uses a SSH key and password. I was successful with creating the connection to the SFTP with the key and password. I can now browse the SFTP within Data Factory, see the only folder on the service and see all the TSV files in that folder.</p>
  
  <p>Naturally, Azure Data Factory asked for the location of the file(s) to import. I use the "Browse" option to select the folder I need, but not the files. I want to use a wildcard for the files.</p>
  
  <p>When I opt to do a *.tsv option after the folder, I get errors on previewing the data. When I go back and specify the file name, I can preview the data. So, I know Azure can connect, read, and preview the data if I don't use a wildcard.</p>
  
  <p>Looking over the documentation from Azure, I see they recommend not specifying the folder or the wildcard in the dataset properties. I skip over that and move right to a new pipeline. Using Copy, I set the copy activity to use the SFTP dataset, specify the wildcard folder name "MyFolder*" and wildcard file name like in the documentation as "*.tsv".</p>
  
  <p>I get errors saying I need to specify the folder and wild card in the dataset when I publish. Thus, I go back to the dataset, specify the folder and *.tsv as the wildcard.</p>
  
  <p>In all cases: this is the error I receive when previewing the data in the pipeline or in the dataset.</p>
  
  <blockquote>
    <p>Can't find SFTP path '/MyFolder/*.tsv'. Please check if the path exists. If the path you configured does not start with '/', note it is a relative path under the given user's default folder ''. No such file . </p>
  </blockquote>
  
  <p>Why is this that complicated? What am I missing here? The dataset can connect and see individual files as:</p>
  
  <blockquote>
    <p>/MyFolder/MyFile_20200104.tsv</p>
  </blockquote>
  
  <p>But fails when you set it up as</p>
  
  <blockquote>
    <p>/MyFolder/*.tsv</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/uipE8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uipE8.png" alt="enter image description here"></a></p>