Medium severityconfiguration
Power BI Refresh Error:
002003 (42S02)
What does this error mean?
A COPY INTO, INFER_SCHEMA, or stage-related command failed because the referenced file format object does not exist in the current database or schema.
Common causes
- 1The file format was created in a different database or schema than the one currently in use
- 2The file format was dropped as part of a schema cleanup and not recreated
- 3The fully qualified name is misspelled (database.schema.format_name)
- 4The role executing the query lacks USAGE privilege on the file format object
How to fix it
- 1Step 1: Run SHOW FILE FORMATS IN SCHEMA your_db.your_schema to list available formats.
- 2Step 2: If the format does not exist, recreate it with CREATE FILE FORMAT including all required options.
- 3Step 3: Qualify the format name fully in your command: FORMAT_NAME = 'your_db.your_schema.your_format'.
- 4Step 4: Grant usage: GRANT USAGE ON FILE FORMAT your_format TO ROLE your_role.