AnsweredAssumed Answered

Arcpy Describe returns connected user as schema owner

Question asked by PSLarkin_SpokaneCounty on Apr 19, 2019
Latest reply on Apr 24, 2019 by PSLarkin_SpokaneCounty

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 = "...\\userA_Staging_ASSRSDE.sde"

query = "SELECT pid_num as parcel, Shape FROM ASSRSDE.dboExample.Vertical_Units WHERE ISNULL(PID_NUM, '') <> ''"

parcel = arcpy.MakeQueryLayer_management(input_database=input,out_layer_name="memory\\VU",query=query)

print( arcpy.Describe(parcel).baseName.lower())

# returns: assrsde.userA.vertical_units

Outcomes