I have a tool in a Python toolbox. As a parameter, I want to let the user select an existing (or possibly create a new) SDE connection. What value for datatype should I use for this?

I have tried DERemoteDatabaseFolder, definied by the documentation as:

The database connection folder in ArcCatalog.

However, it only lets me select files of mysterious "Basic Types" and does not show me any SDE files. I also tried DEFile, setting param.filter.list = ['sde']. But that options required the user to find the SDE files on her own, which is not so easy if they are located somewhere in the AppData\Roaming folder.

Is there any better alternative?

  • 2
    Try 'workspace'
    – KHibma
    Commented Nov 17, 2015 at 13:44

2 Answers 2


@KHibma is right. Use DEWorkspace

def getParameterInfo(self):
    param0 = arcpy.Parameter(
        displayName="Input Sde Connection",

To limit the choices:

param0.filter.type = "Workspace"
param0.filter.list = ["Remote Database"]
  • What if that doesn't work with your script?
    – user125266
    Commented Apr 24, 2019 at 18:53

I don't have enough rep to comment on @Farid Cheraghi's answer which mostly worked for me with one change:
After creating param0, if I use

param0.filter.type = "Workspace"  

The tool shows with a red x in the Catalog pane of ArcMap. Right clicking and selecting the "Why..." menu option brings up a Python Errors window with this message:

Traceback (most recent call last):
  File "<my filename.py>", line 64, in getParameterInfo
    param0.filter.list = "Workspace"
  File "d:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\arcobjects\_base.py", line 89, in _set
    return setattr(self._arc_object, attr_name, cval(val))
ValueError: FilterObject: Input value must be a list

But if I just take that line out and only use

param0.filter.list = ["Remote Database"]  

I am able to see .sde files in the parameter file picker window. This is with ArcMap 10.6.1 so something may have changed since version 10.3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.