New answers tagged

2

The documentation (What is a versioned view) covers this in detail: A versioned view incorporates a database view, stored procedures, triggers, and functions to allow you to use Structured Query Language (SQL) to read or edit data in a geodatabase that has been registered to use traditional versioning. When you query a versioned view, you can see the data ...


4

The ".sde" file is simply a ESRI file format that contains the connection information required to connect to an ESRI enterprise geodatabase. Using ArcMap or ArcCatalog, you can right-click on the ".sde" file and choose "Connection Properties" to see all the database connection information. This includes the database host machine, the database name and the ...


0

You're making use of cursors within cursors, as well as appling sql queries to those cursor which can slow down the process exponentially. Your dissolve also appears to be unnecessary as it appears to be used to get unique IDs. I suggest making use of dictionaries to store information. This task can be completed with four cursors run one at a time. Search ...


0

As Vince suggested in his comment, it is possible to get sde file using ArcPy installed with ArcGIS Server. So for complete setup of registering database which runs on database server accessed through different IP's (e.g. internal/external IP) from ArcGIS Server and clients (publishers) it is needed to: Create sde file (Publisher database connection) for ...


0

It appears you need to open an edit session, as you pointed out, this is on a versioned geodatabase. I am just looking at your stack trace provided. If this is a scheduled job, and your connection file is using a Windows NT connection, I believe you can set your scheduled task to run under your users credentials. Or better yet, if you can get a named ...


0

Thanks a lot for your help both of you ! I finally done something like that : import arcpy arcpy.env.workspace = "C:/myWorkspace.sde" tables = arcpy.ListTables("X_*") emptyTables = [] print "--- Tables where fields Field_A or Field_B are empty or null :" for table in tables: vals = False with arcpy.da.SearchCursor(table, ['Field_A', 'Field_B']) as ...


1

@BERA has a good answer but it can be made more efficient by skipping the creation of lists and by breaking the iteration of the cursor if a value is found. import arcpy arcpy.env.workspace = "C:/myWorkspace.sde" tables = arcpy.ListTables("X_*") for table in tables: vals = False with arcpy.da.SearchCursor(table, ['FieldA','FieldB']) as cursor: ...


1

Use the da.SearchCursor to create a list of all entries then check list: import arcpy arcpy.env.workspace = "C:/myWorkspace.sde" tables = arcpy.ListTables("X_*") for table in tables: all_rows = [] with arcpy.da.SearchCursor(table, ['FieldA','FieldB']) as cursor: for row in cursor: all_rows.extend(row) if all_rows.count(None) ...


1

A simple hex dump of an .sde string using a program like HxD shows that most of the connection properties are available. It would be left up to the programmer to reverse engineer the structure. As long as the connection string does not store a password it should be possible. e.g.


Top 50 recent answers are included