|
POST
|
If you are going to move that much data, you should count on it taking some time especially if you are dependent on network connections, vpn's etc. You have a few options, and I would do it as a python script you can either run as a scheduled task or set it and forget it after quitting time. https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/copy.htm https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/feature-class-to-feature-class.htm https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/append.htm (you'd need to create features in the target Egdb of the same names and schema as your fgdb) https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/export-xml-workspace-document.htm https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/import-xml-workspace-document.htm All come to mind. I suspect best practice is in the eye of the beholder; for me it's whatever works and gives me the smallest headache
... View more
12-29-2020
10:24 AM
|
0
|
5
|
8468
|
|
POST
|
So.... You want to change the psicd value of 150 to 145? https://pro.arcgis.com/en/pro-app/latest/help/data/tables/fundamentals-of-field-calculations.htm
... View more
12-29-2020
07:10 AM
|
3
|
1
|
2731
|
|
POST
|
Perhaps you could add a little more detail to your objective.
... View more
12-29-2020
07:04 AM
|
1
|
3
|
2736
|
|
POST
|
There is python and then there is the arcpy library/module of python. If you aren't real familiar with geoprocessing tools in ArcGIS, I would expect things to be 'a little rocky' for you. Basically all arcpy provides is scripting environment with which to automate the various typical processes that you can do manually in ArcGIS.
... View more
12-28-2020
01:44 PM
|
1
|
0
|
4863
|
|
POST
|
The syntax is a 'you say tomato', I say tomaato' sort of thing. Hosted feature layers are geo-spatial datasets that are hosted somewhere on the internet either in AGOL or an enterprise Portal. Sounds like you are not using either, rather you are using a geodatabse feature class.
... View more
12-28-2020
12:38 PM
|
1
|
3
|
4869
|
|
POST
|
So neither layer1, or layer2 is hosted? Try arcpy.append_management instead. https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/append.htm
... View more
12-28-2020
11:41 AM
|
1
|
6
|
4887
|
|
POST
|
I've been doing a bunch of geocoding lately and posting a number of questions to the Data Managment Questions Board. The Label choices for questions include Geocoding: JoeBorgione_0-1608828272829.png But for posting a suggestion the list is much different: JoeBorgione_1-1608828393340.png I'm not sure what the other boards look like, but a consistent list between the two would be nice.
... View more
12-24-2020
08:47 AM
|
2
|
2
|
1072
|
|
IDEA
|
I do a fair amount of geocoding of tables where the address field is null or blank. It would be helpful to geocode just those records with an address. JoeBorgione_0-1608827656210.png
... View more
12-24-2020
08:35 AM
|
1
|
0
|
3127
|
|
POST
|
@TimWitt2 wrote a pretty cool piece of code a few years back that finds unattached dangles in a road network. Maybe he'll see this and be able to provide some insight.
... View more
12-23-2020
02:45 PM
|
2
|
0
|
1823
|
|
POST
|
For now I've created a python script tool that uses a search cursor and a select statement within the search cursor to select a single feature in the input feature class and append it to target feature class. It works, but anytime you have a search cursor with a selection, it's not the fastest thing around; to work through 100 records in the input feature class, it takes about 2.5 minutes to complete; however, since it's appending one record at a time, the sequence based attribute rule fires and updates the field accordingly.
... View more
12-23-2020
10:14 AM
|
1
|
3
|
2272
|
|
POST
|
Is it possible to get an attribute rule to fire sequentially as records are appended to a feature class? As a test I set a geodatabase sequence in a file geodatabase with a start value of 100 and increment value of 1. I then added a standard return NextSequenceValue rule to a field, UniqueID: return "Prefix-" + NextSequenceValue ("SequenceName") Then I appended several hundred records from another feature class. All of the appended records have a UniqueID value of Prefix-100. I was hoping they would have Prefix-100, Prefix-101, Prefix-102 and so on. Is there a way to write a rule that uses a database sequence and will assign incremental values with a multi-record append? @XanderBakker
... View more
12-22-2020
03:17 PM
|
1
|
6
|
2297
|
|
POST
|
csv and other crossover modules aren't unicode compliant by default Good to know!
... View more
12-22-2020
02:24 PM
|
0
|
0
|
6444
|
|
POST
|
This is totally un-ArcGIS Pro for now; just pure python...
... View more
12-22-2020
02:21 PM
|
0
|
0
|
6444
|
|
POST
|
After some google fishing I added a couple of things that got me past the errors: ''' not entirely sure what this does but I remember it from an earlier post I made sometime back using python 3.6, the old reload(sys) does not work'''
import importlib
importlib.reload(sys)
''' added encoding = 'utf-8', errors = 'ignore''''
outFile = open(os.path.join(outFolder,dotcsv),'w',encoding = 'utf-8', errors = 'ignore', newline ='')
... View more
12-22-2020
02:14 PM
|
1
|
0
|
6446
|
|
POST
|
I have written a script that that (should) step through a list of all the tables in a mySql database and write the contents of each to a csv table. I've used this basic construct successfully in the past but with specified tables. This time I'm looping through all the tables in the given database and I'm encountering Unicode errors. For example: UnicodeEncodeError: 'charmap' codec can't encode character '\x9d' in position 646: character maps to <undefined> The script roles along and creates a couple dozen csv files without a hitch so I looked at what has been created and figured the next table in the list is the culprit. But I get a different unicode error when I run the script on just that table: UnicodeEncodeError: 'charmap' codec can't encode character '\u0400' in position 1255: character maps to <undefined> Clearly I stand to see these sorts of errors every time through the loop. Is there way to trap these errors and then exclude the offending character from the output? Here's the code, head to toe: # -*- coding: utf-8 -*-
"""
Created on Tue Dec 22 12:37:49 2020
@author: jborgione
"""
import mysql.connector as mysql
from mysql.connector import FieldType
import csv,os
outFolder = r'N:\GIS\E360'
def createCSV(table):
cn = mysql.connect(user = 'users', password = 'password', host = 'host', database = 'master_db')
cursor = cn.cursor()
table = 'complaints'
query = f'SELECT * from {table};'
cursor.execute(query)
rows = cursor.fetchall()
column_names = [i[0] for i in cursor.description]
dotcsv = f'{table}.csv'
outFile = open(os.path.join(outFolder,dotcsv),'w',newline ='')
myFile = csv.writer(outFile)
myFile.writerow(column_names)
myFile.writerows(rows)
cursor.close
def main():
tableList = []
cn = mysql.connect(user = 'user', password = 'password', host = 'host', database = 'master_db')
cursor = cn.cursor()
allTables = "show tables"
cursor.execute(allTables)
for (allTables) in cursor:
tableList.append(allTables[0])
cursor.close
for table in tableList:
createCSV(table)
if __name__ == '__main__': #if def main exists, call it
main()
... View more
12-22-2020
01:22 PM
|
0
|
5
|
6456
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-11-2018 07:12 AM | |
| 1 | 05-17-2021 11:18 AM | |
| 1 | 06-29-2021 11:42 AM | |
| 1 | 07-05-2012 07:49 AM | |
| 1 | 09-03-2016 06:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-19-2026
11:56 AM
|