Hi ch-azure-sa •,
Welcome to Microsoft Q&A forum.
As I understand, you are trying to bulk insert to a azure SQL database table from the text file stored in BLOB storage and getting error path invalid.
Please make sure the file path is correct.
Permissions are there to access path in Azure Blob Storage.
DATA_SOURCE = 'data_source_name'
Applies to: SQL Server 2017 (14.x) and Azure SQL Database.
Specifies a named external data source pointing to the Azure Blob Storage location of the file that will be imported. The external data source must be created using the TYPE = BLOB_STORAGE
option added in SQL Server 2017 (14.x). For more information, see CREATE EXTERNAL DATA SOURCE. For an example, see Import data from a file in Azure Blob Storage.
Requests from Azure SQL Database using SAS tokens might be blocked with the following error:
Msg 4861, Level 16, State 1, Line 27
Cannot bulk load because the file "FileName.extension" could not be opened. Operating system error code 5(Access is denied.).
Only a subset of Azure services are currently on the trusted services list. For a complete list of trusted services and updates on Azure storage firewall settings, see Trusted access for resources registered in your subscription.
Refer examples here and try https://video2.skills-academy.com/en-us/sql/relational-databases/import-export/examples-of-bulk-access-to-data-in-azure-blob-storage?view=sql-server-ver16
Let us know if this helps.
Awaiting your reply.
Thanks