def getFeatureClasses(schema, table, attribute, project_model): dictFeatures = {} sql_val = "SELECT OBJECTID, " + attribute + " FROM " + schema + "." + table + " WHERE PROJECT_MODEL = '" + project_model + "' ORDER BY OBJECTID DESC" # read value print "SQL: " + sql_val WriteOutLine("SQL: " + sql_val) sdeReturn = sdeConn.Execute(sql_val) for row in sdeReturn: print row fID = row[0] dictFeatures[fID] = row return dictFeatures #------------------------------------------------------------------------ # ---------------- Back up to Load ready for loading #------------------------------------------------------------------------ error_msg = "ERROR: Back up to Load ready for loading." try: fcsDict = getFeatureClasses("GEO", "TRANSFER", "FC_NAME", project_model) keyFeatures = fcsDict.keys() keyFeatures.sort() for key in keyFeatures: row = fcsDict[key] from_feature_class = row[1] data_backup(DATA_CONN_FOLDER, LOAD_DIR, FGDB_from, sSchema_to, sSDEconn_to, from_feature_class) except OSError, (errno, strerror): print ERROR_STR % {'path' : error_msg, 'error': strerror }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.