I'm using an SQL query (from MS SQL Server) on an enterprise DB connection, and am able to create a stand-alone table from the "Make Query Layer" tool.
After this table (stand-alone query table) is created, I want to export it to a file geodatabase, but whenever I use Table to Geodatabase conversion, I always get the error of "Failed to convert TableName. ERROR 999999: Error executing function. Failed to execute (CopyRows).
I know if I manually right click the table, export -> Data, I am able to do this. But I want to script this in ArcPy to do it, but the conversion won't work. I even specified Unique Identifiers but am hitting road blocks.
I am using ArcGIS Desktop 10.4.1. My end goal is to essentially use an SQL query to get a table (non-spatial), and input that table into a FGDB (as a FGDB table).
All other tools like Table to Table results in the exact same error. Parameters only include my input rows (which is the result from Make Query Layer) and output FGDB. I have not scripted anything in Python yet as I am trying everything in ArcGIS Desktop first to see if it works there.
Within MS SQL, it is a normal (non-ESRI) database. For the "Unique Identifier Fields" I tried multiple instances, I used one (unique) field "AssetID", a combination of 2-3 field "Field1", "Field2","Field3", and i also tried leaving it blank (all unselected).