Databricks · Missing input
[TABLE_OR_VIEW_NOT_FOUND] in a Databricks job
Databricks could not find a table or view with that name where it looked. Either the object does not exist yet, the name leads to a different catalog or schema than you expect, or the identity running the job is not allowed to see it.
[TABLE_OR_VIEW_NOT_FOUND] The table or view `sales`.`orders_clean` cannot be found. Verify the spelling and correctness of the schema and catalog. If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog. To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01
What this error means
A table name has three parts: catalog, schema and table. Parts you leave out are filled in from the current catalog and schema of the session, much as a working directory completes a file path. A job that runs with different defaults looks in a different place.
Databricks gives the common reasons: the object does not exist, a name is misspelled, the object is not in the current schema, or the user has no access to it and therefore cannot see it. Temporary views are a case of their own, because they exist only in the session that created them.
Why it happens
- The table does not exist. The task that creates it failed, was skipped or has not run yet in this run, or the table was renamed or dropped.
- The name leads to another schema or catalog. The notebook worked interactively under one default schema, and the job runs under another.
- The job’s identity cannot see the table. The job runs as a service principal without
USE CATALOG,USE SCHEMAorSELECTon the object. - A temporary view from another session. A temporary view created in one task or notebook does not exist in the session of another.
How to fix it
Read the name in the error
The message shows the name as it was written. If it has fewer than three parts, the missing ones came from the session’s current catalog and schema.
Check where the session is looking
In the failing notebook or query, run
SELECT current_catalog(), current_schema()and compare the result with where the table really is.Check that the table exists and who can see it
Run
SHOW TABLES IN main.salesas yourself, then look at the grants of the identity the job runs as. If you can see the table and the job cannot, it is a permission problem.Use the full name, or grant access
Write the name with its catalog and schema, or set them at the start of the task with
USE CATALOGandUSE SCHEMA. For a permission problem, grant the identityUSE CATALOG,USE SCHEMAandSELECT.Name the catalog and the schema 01-SELECT * FROM orders_clean02+SELECT * FROM main.sales.orders_clean
Fix the order of tasks, then repair the run
If another task creates the table, make this task depend on it, so it cannot start first. Replace a temporary view that tasks share with a table or a permanent view. Then use Repair run.
How to stop it coming back
- Use three-part names in jobs, or set the catalog and schema at the start of each task.
- Declare a task dependency for every table one task reads from another.
- Run jobs as a service principal, and grant its access in the same change that creates the tables.
With PipelineMender AI
The next failed run explains itself.
PipelineMender reads each failed task’s error and stack trace and the job settings, including task dependencies, through the Jobs API with Can View. For this failure the report quotes the name Databricks could not find, relates it to the task that should have produced it, and gives the likely root cause with the change for you to review.
Is the error in front of you now? Start a trial, choose Report an incident and paste it in. No connection is needed for that.
- Read-only access
- You review every change
- No model training
Questions
Common questions about this error.
The table exists. Why can the job not find it?
Either the name leads to a different catalog or schema in the job than in your session, or the job runs as an identity without access. Databricks reports a table you are not allowed to see as not found.
Can tasks in the same job share a temporary view?
No. A temporary view exists only in the session that created it. Write a table or create a permanent view when another task has to read the result.
How do I avoid the error when dropping a table that may not exist?
Use DROP TABLE IF EXISTS or DROP VIEW IF EXISTS, as the error message itself suggests.
Checked against: TABLE_OR_VIEW_NOT_FOUND error condition Name resolution Unity Catalog privileges reference Configure task dependencies Troubleshoot and repair job failures
Last reviewed 13 November 2026 against the Databricks documentation. PipelineMender AI is an independent product and is not affiliated with Microsoft or Databricks; product names are trademarks of their owners.