I'm using MakeQueryLayer to create a view from a database table in the ArcMap python window. The command completes successfully but I can't see the result. Where does it go?
arcpy.MakeQueryLayer_management(r'Database Connections\Connection to database.sde', 'csw_test','select * from REPORT_TBL',"OBJECTID (Long Integer, Not nullable)") <Result 'csw_test'>
Nothing shows up in table of contents, List by Source is active, changing panes and forcing a refresh has no effect. Using AddTableView doesn't work:
arcpy.mapping.AddTableView('Layers','csw_test') Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\arcgis\desktop10.6\arcpy\arcpy\utils.py", line 182, in fn_ return fn(*args, **kw) File "c:\arcgis\desktop10.6\arcpy\arcpy\mapping.py", line 113, in AddTableView assert isinstance(data_frame, DataFrame) AssertionError