File '/users/NYCTripSmall.parquet' cannot be opened because it does not exist or it is used by another process.

Ricard Valero 30 Reputation points
2023-05-24T12:15:27.4466667+00:00

I am following the Get Started with Azure Synapse Analytics tutorial, and i'm on step 2. Having gone through all the instructions, at the last step which is described as "Explore the content of the file using the relative path and the data source:

SELECT
    TOP 100 *
FROM
    OPENROWSET(
            BULK '/users/NYCTripSmall.parquet',
            DATA_SOURCE = 'ContosoLake',
            FORMAT='PARQUET'
    ) AS [result]

															

Then once i copy that code and run it the query fails with the above error = File '/users/NYCTripSmall.parquet' cannot be opened because it does not exist or it is used by another process.

I have the contributor role on the storage account, as a previous solution suggested but nothing changes. WHat should I do?

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,563 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,385 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasimTamboli 5,215 Reputation points
    2023-05-24T14:29:48.8466667+00:00

    If you're encountering the error "File '/users/NYCTripSmall.parquet' cannot be opened because it does not exist or it is used by another process" while following the Get Started with Azure Synapse Analytics tutorial, there are a few steps you can take to troubleshoot the issue:

    Verify the file path: Double-check that the file path '/users/NYCTripSmall.parquet' is correct and points to the location where the Parquet file is stored. Ensure that the file exists at that location in the specified data source.

    Check for file existence: Confirm that the Parquet file exists in the specified location. You can use Azure Storage Explorer or any other storage management tool to browse the storage account and validate the presence of the file.

    Ensure proper access permissions: As you mentioned, you already have the Contributor role on the storage account. However, ensure that you have the necessary permissions to access the file and perform operations on it. Confirm that you have the required access to the data source and the Parquet file.

    Check if the file is being used: The error message suggests that the file may be used by another process. Ensure that there are no other processes or applications accessing the file at the same time. If any other process is using the file, wait for it to release the file before running the query again.

    Verify the data source configuration: Validate the configuration of the 'ContosoLake' data source. Ensure that it is correctly set up and pointing to the correct storage account and container where the Parquet file is located.

    Confirm the file format: Ensure that the file you are trying to access is in the expected Parquet file format. If it is not a valid Parquet file, it may cause errors while attempting to open it.

    By following these troubleshooting steps, you should be able to identify and resolve the issue preventing the file from being opened.


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.