Medium severitydata
Oracle Database Error:
ORA-01403
What does this error mean?
A SELECT INTO statement in PL/SQL returned no rows when exactly one row was expected.
Common causes
- 1A lookup or enrichment stored procedure expects a matching row but the source data has no match
- 2Pipeline passes an ID that does not exist in the reference table
- 3The reference table is empty (e.g. not yet seeded or truncated by a previous step)
- 4WHERE clause is too restrictive
How to fix it
- 1Step 1: Add exception handling in the stored procedure: `EXCEPTION WHEN NO_DATA_FOUND THEN <handle gracefully>`;
- 2Step 2: Use a cursor or SELECT COUNT(*) before SELECT INTO to check if data exists.
- 3Step 3: Verify the reference table is populated before the lookup step runs.
- 4Step 4: Add a prerequisite check in the ADF pipeline to validate the lookup table is not empty.
- 5Step 5: If the lookup is optional, return NULL instead of raising the exception.
Example log output
ORA-01403: no data found
ORA-06512: at "SCHEMA.LOOKUP_PROCEDURE", line 45
ORA-06512: at line 1