Tag Info

Hot answers tagged

5

The "multiversion" name is somewhat misleading. Every versioned feature class has three tables in the database: The business/base table (this is the table that you could query directly) The additions table (something like A100) The deletes table (something like D100) Any changes in the current version will be in the 'A' table and deletions in the 'D' ...


3

import arcpy, os, pyodbc def GetPrivileges(table): cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=servername;DATABASE=dbname;UID=user;PWD=password') cursor = cnxn.cursor() cursor.execute("EXEC sp_helprotect '" + table + "'") rows =cursor.fetchall() privileges = [] for row in rows: privileges.append(row.Grantee) return ...


3

Those ArcPy functions utilize the SgShape functions lower in the API stack. The ST_GEOMETRY object was built using some of those same functions, but doesn't expose them all (just the set that implements those required by Spatial Types and Functions implementation, which doesn't include LRS). The LRS primitive list exposed at the ArcSDE API isn't large: ...


3

Since you tagged this with python, you can also accomplish this with an updatecursor. Using field calculator in python for multiline statements is sometimes more difficult than the same function in a cursor. with arcpy.da.UpdateCursor("Mange_Waste", ("Q1", "Q2")) as cursor: for row in cursor: if row[0] == "a": row[1] = 1 else: ...


3

you need to use a block or to write everything in a single line (respecting the indentations) block (with Python parser) def myfunction(a,b): if a == 'a': return 1 else: return 0 then you call the function defined in your block myfunction(!Q1!, !Q2!) note that this is a general solution, but in your specific case you could ...


2

Well, before you convert the database, you could run the Domain to Table geoprocessing tool http://resources.arcgis.com/en/help/main/10.1/index.html#/Domain_To_Table/001700000022000000/ which should convert a domain to a stand-alone table that you could put in the database. Then, you should be able to just convert the database, including stand-alone tables ...


1

Your logic is correct. This help guide may help you out in the future for using python in the field calculator. There are already valid pythonic answers above I'll post another option, in VB (sometime's it is simplier than python). In field calculator choose "show codeblock" for "Q2" under "Pre-logic script code" write: In VB: if [Q1] = "a" then result ...


1

Yes, that's it I think. They are probably libraries we aren't able to distribute, or we don't want to because they could interfere with your existing setup. This is another good resource page for setting up the connection. I'm thinking that if you have ArcGIS installed already then it's most the environment variables that need setting.


1

As described in the documentation, Multiversioned views incorporate database views, stored procedures, triggers, and functions to access a specified version of data in a geodatabase table using Structured Query Language (SQL). Not everyone has a need to use them. When you encounter a situation that can only be resolved by accessing versioned data ...


1

After some further research I have confirmed that this is a known bug. Hopefully adding this information here will save someone some time in the future as it was not easy to find using Google or the Esri site. Bug NIM-087927 Submitted: Jan 8, 2013 Status: Open http://support.esri.com/en/bugs/nimbus/TklNMDg3OTI3


1

My eventual solution was to avoid the ArcSDE interface and arcpy and use cx_Oracle, as per answers to a question here. The below class returns privileges on an admin/owner connection for either tables (returning a list of users with access) or users (returning a list of tables they can access). I imagine there are more elegant ways to do this, but with my ...



Only top voted, non community-wiki answers of a minimum length are eligible