I am getting Table_or_View Not found error notebook activity run

Ketan Bharat | MAQ Software 40 Reputation points
2024-11-14T07:29:29.0733333+00:00

User's image

My Notebook activity is under for each activity. under for each activity , i have copy activity. upon success of copy activity i have this note book activity. first copy activity creates a temp table and then notebook activity access this temp table in notebook. i have also added RefreshTable command in the notebook to refresh table in lakehouse. still i am getting this error. i have even set batch count for for each activity to 7. But, it didn't work.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,995 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ganesh Gurram 1,825 Reputation points Microsoft Vendor
    2024-11-14T17:31:17.5533333+00:00

    @Ketan Bharat | MAQ Software - Thanks for the question and using MS Q&A platform.

    The error message you're encountering indicates that the table or view named job_static_tblDivisionTypes_temp cannot be found in your notebook activity. This issue is often related to the scope and timing of table creation within your workflow in Azure Data Factory (ADF).

    Here are a few potential solutions and troubleshooting steps:

    1. Check Table Creation Timing: Ensure that the temp table job_static_tblDivisionTypes_temp is successfully created by the copy activity before the notebook activity attempts to access it. You can add logging or debugging steps to verify this.
    2. Validate Table Name and Schema: Double-check the exact name and schema of the temp table created by the copy activity. Ensure there are no typos or mismatches.
    3. Add Wait or Delay: Sometimes, the notebook activity may start before the table creation is fully completed. Adding a small delay or wait activity between the copy activity and the notebook activity can help.
    4. Refresh Table Command: You mentioned using the RefreshTable command, but ensure it is correctly placed and executed within the notebook before any queries that attempt to access the temp table.
    5. Check for Concurrent Operations: With a batch count of 7, ensure that concurrent operations are not interfering with each other. It might be beneficial to reduce the batch count temporarily to see if it resolves the issue.
    6. Use Fully Qualified Table Names: If you are working with multiple databases or schemas, use the fully qualified table name (e.g., schema_name.table_name) to avoid ambiguity.

    By following these steps and validating each part of your workflow, you should be able to identify and resolve the issue causing the "Table or View Not Found" error.

    Hope this helps. Do let us know if you have any further queries.  

    ------------- 

    If this answers your query, do click `Accept Answer` and `Yes` for was this answer helpful. And, if you have any further query do let us know.  


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.