When returning the name of a Feature Class used to create a Query Layer, the schema name is incorrect. It matches the name of the user in the SDE connection file.
In this example I'd expect to the see the name with the correct schema owner: dboExample. However I get userA.
If I create a Feature Layer with the same SDE connection the correct name is returned: assrsde.dboExample.vertical_units
This seems like a bug. Tested on 10.3 and Pro 2.3 arcpy.
input <SPAN class="operator token">=</SPAN> <SPAN class="string token">"...\\userA_Staging_ASSRSDE.sde"</SPAN>
query <SPAN class="operator token">=</SPAN> <SPAN class="string token">"SELECT pid_num as parcel, Shape FROM ASSRSDE.dboExample.Vertical_Units WHERE ISNULL(PID_NUM, '') <> ''"</SPAN>
parcel <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>MakeQueryLayer_management<SPAN class="punctuation token">(</SPAN>input_database<SPAN class="operator token">=</SPAN>input<SPAN class="punctuation token">,</SPAN>out_layer_name<SPAN class="operator token">=</SPAN><SPAN class="string token">"memory\\VU"</SPAN><SPAN class="punctuation token">,</SPAN>query<SPAN class="operator token">=</SPAN>query<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Describe<SPAN class="punctuation token">(</SPAN>parcel<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>baseName<SPAN class="punctuation token">.</SPAN>lower<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># returns: assrsde.userA.vertical_units</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>