0

When I first attempted to run the data transfer, I got the error "The remote server returned an error: (403) Forbidden.,Source=Microsoft.WindowsAzure.Storage,StorageExtendedMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature." I realized that this error was caused by me enabling staging. However, the only reason I enabled staging in the first place is because it is necessary for the first row to be registered as a header. When I turn off the setting to read the row as the first header, the mapping gets messed up.

So far, I've tried just leaving on the read the first row as a header. When I do this, though, I get the error message Direct copying data to Snowflake is only supported when source dataset "First row as header" is set as false or "Row delimiter" is \r\n, please enable staging or fix First row as header. No matter what the row delimiter is set to, the only fix to this issue is enabling staging. However, one user on stackoverflow said enabling staging causes the 403 forbidden error, which turned out to be true. If anyone has any help for this problem please let me know. At this point I cant figure out any fixes so any help would be appreciated. Thanks!

1 Answers1

0

As per MS document

If you want to use Direct copy to Snowflake Your source dataset connector should be blob storage With SAS URI authentication and source data format Delimited text

  • TherowDelimiter is \r\n, or any single character. If row delimiter is not ā€œ\r\nā€, firstRowAsHeader need to be false, otherwise firstRowAsHeader need to be True.

If it's not compatible as above, then you need to use Staged copy to Snowflake with built in Enable stagging option and specify the intermediate storage account with SAS URI authentication.

"The remote server returned an error: (403) Forbidden.,Source=Microsoft.WindowsAzure.Storage,StorageExtendedMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature."

The above error can Cause because of multiple reasons as below:

  • Invalid SAS token used for authentication.
  • Firewall enabled on storage account.
  • Clock on your computer is incorrect.

To resolve this, Try below steps:

  1. Enable firewall to all networks or whitelist your IP if you are giving permission to selected IP's. enter image description here
  2. Generate SAS token with appropriate permission and use it in ADF(try with changing key 1 to key 2 and the genrate) . enter image description here

Also refer this SO thread with similar error

Pratik Lad
  • 4,343
  • 2
  • 3
  • 11