arcpy.da.Editor for a versioned environment?

2030
4
Jump to solution
08-29-2018 11:32 AM
KeithSoRelle
New Contributor II

Trying to setup python script using arcpy.da.Edtior to edit in a versioned environment, but I am unable to figure out how to add the version to the database connection

Database: "Database Connections\#\WATER_DEV_OSA.sde"

Version:    "Name_Dev"

I've tried "Database Connections\\WATER_DEV_OSA.sde\\Name_Dev" and "Database Connections\WATER_DEV_OSA.sde, Name_Dev "

Any thoughts would be great. 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
KeithSoRelle
New Contributor II

Okay I think I got it with some of your help. I needed to change the Geodatabase Connection Properties - specifically changing the transactional version. 

Thanks!

View solution in original post

0 Kudos
4 Replies
JoshuaBixby
MVP Esteemed Contributor

The version is already stored in the database connection file (*.sde).  If you want to edit a specific version, the easiest approach is to configure the database connection file before passing it to the Editor.  You can use Create Database Connection—Help | ArcGIS Desktop if you know the parameters ahead of time and there isn't a pre-configured database connection file, or you can try Change Version—Help | ArcGIS Desktop .  There are important caveats to pay attention to when using Change Version.

0 Kudos
KeithSoRelle
New Contributor II

This is on an enterprise database connection. The default.dbo is the standard version.

I already have an existing connection created. I'm now looking to specify a version other than the default. Is there no way to specify this in the file path? 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

As I mention above, either update the existing file using ArcCatalog or Pro to point to the version you want, use Create Database Connection to create another database connection file with the version you want, or try using Change Version.

0 Kudos
KeithSoRelle
New Contributor II

Okay I think I got it with some of your help. I needed to change the Geodatabase Connection Properties - specifically changing the transactional version. 

Thanks!

0 Kudos