Skip to main content
Does anyone have any examples of reading an SDE feature class with fmeobjects in Python?

 

 

I was able to do it with a shapefile without any issue but am having trouble figuring out how and where to specify the parameters for the GEODATABASE_SDE format.

 

 

I am using an SDE connection file if that makes it any easier. However, whenever I try to open() the reader it pops up the SDE connection properties dialog. I get the feeling I'm just not specifying the reader parameters/directives correctly, but without finding any examples of the proper format I can only guess.

 

 

Thanks!
Hi Logan,

 

 

good to see that you fond a solution. One good tip for constructing the connection parameters, is to use the FMEDialog class to let you interactively specify the parameters, then storing the result as a constant in your script for consequtive runs. Example:

 

 

-----

 

dialog = FMEDialog()

 

directives = dialog.sourcePrompt("SDE30", "sde")

 

# ... further on ...

 

reader = FMEUniversalReader("SDE30", False, directivesr2])

 

-----

 

 

The sourcePrompt (or destinationPrompt, if you prefer) will give you the same connection dialog as used by the Workbench, returning a connection string that you can use to connect to your data.

 

 

David

Reply