Closed steve-homer closed 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sumantmehtams.
Author: | steve-homer |
---|---|
Assignees: | - |
Labels: | `Data Lake Storage Gen2`, `Service Attention`, `customer-reported`, `needs-triage`, `question` |
Milestone: | - |
@steve-homer
What's the detail ADF trigger you have set?
For upload file with New-AzDataLakeGen2Item
, for performance of big file, it will upload from blob endpoint parallelly. This might be the reason the event trigger does not fire.
@blueww
It's data.api string is in CopyBlob PutBlob PutBlockList FlushWithClose DeleteBlob CreateFile DeleteFile and data.contentLength number is greater than 0
thanks,
@steve-homer
In most cases, New-AzDataLakeGen2Item will use PutBlob or PutBlockList to upload File (use which request depends on file size). There's only one exception currently, when you run New-AzDataLakeGen2Item with SAS credential, and set -Permission or -Umask, will use Path-Create to upload the file.
To get the details, would you please share
The file is 2.3kb in size
$destPath = $dirname + (Get-Item $local_src_file).Name
New-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $destPath -Source $local_src_file
I don’t understand this – I’m creating the file with the New-AzDataLakeGen2Item cmdlet.
Happy to capture this if you can point me to an online guide on how to capture the traffic?
Thanks,
From #1, #2, the PutBlob request should be used. For #3, as you said "Downloading and then reuploading via Azure Storage Explorer does cause the trigger to fire.", so how you "reuploading via Azure Storage Explorer", do you upload it from Blob Containers? what's the Azure Storage Explorer version you use? for #4, you can use wireshark or fiddler.
Ah okay, I'm literally clicking the upload button in Azure Storage Explorer, the underlying command it's running is
$env:AZCOPY_CRED_TYPE = "Anonymous";
./azcopy.exe copy "C:\Users\xxxxxxx\Downloads\sys_user_metadata.json" LONG_PATH_ELIDED_HERE --overwrite=prompt --from-to=LocalBlob --blob-type BlockBlob --follow-symlinks --put-md5 --follow-symlinks --recursive --trusted-microsoft-suffixes=;
$env:AZCOPY_CRED_TYPE = "";
Azure Storage Explorer v1.19.0
I'll look into wireshark and fiddler ASAP.
@steve-homer
I also use Azure Storage Explorer v1.19.0. As I see, New-AzDataLakeGen2Item and Azure Storage Explorer both use the PutBlob request, so if your ADF trigger has configured PutBlob correctly , the request should can cause the trigger to fire.
Strange. It's 100% reproducible that it works through Storage Explorer and not through the cmdlet.
What cmdlet version are you using?
Good news I've figured it out with fiddler.
The powershell script was uploading the file with a path that had a duplicate directory separator. This path was normalised by the storage service so /raw//my_upload -> /raw/my_upload. But the event hub was seeing the original path. As it's matching on the pathname the event was never thrown.
Many thanks for your help!
Description
When a file is uploaded to our azure data lake via New-AzDataLakeGen2Item the configured event trigger does not fire in ADF. Downloading and then reuploading via Azure Storage Explorer does cause the trigger to fire.
Steps to reproduce
Configure an ADF trigger against data lake gen2 and then upload a triggering file via the New-AzDataLakeGen2Item command.
Environment data
Module versions