I am using ArcPy to run through all of the spatial views in an enterprise GDB, register them with the GDB, and assign domains to the registered view. It runs great for most of the views in the GDB, but 5 of our 35 views fail with the titular error.
I've tried several suggested fixes, including
- Turned off background geoprocessing
- Cleared temp folder C:\Users\\AppData\Local\Temp
- Checked additional log files (e.g., C:\Users\\AppData\Local\ESRI): empty
- Check for NULL geometries in underlying SQL tables: don't have any
- Exported view to shapefile (Feature class to feature class): it's valid
- We don't have any user-defined data types
- Deleted and recreated view
- CAST bit to smallint for "Repaired" column in CREATE VIEW statement
RDBMS - MSSQL, version 14.0.17289.0
SDE - SQL Server Enterprise Geodatabase, version 10.5.1
Attempting to register manually within ArcMap, here's an example input
And the fields used in this view
And the SQL data type definitions
View definition with CAST from bit to smallint