POST
|
I am trying to move a table from an ODBC database that I have the ability to extract the tables from but nothing else into a File Geodatabase so that I can join it to an existing layer. The problem is coming up that when I move the table from the existing ODBC to my File Geodatabse the field "Cust_No" , which is the unique identifier field in the source table, is being re-written when it gets transferred over to the geodatabase. Rather than preserving the existing values it just renumbers them so the final records value is equal to the number of records that were transferred across. So if the last value was say 18341 but there were only 16000 records it has just reset this field so its 1-16000 in order. Unfortunately this is the field that I need to do my table join on and this messes things up as you can imagine. When I run the tool from the Table to Table tool in the toolbox I can correct for this issue in the Field Map by adding a new field, and mapping the original "Cust_No" field into it, thereby preserving the values I need. If I output this into a python snippet then I can still get the result that I need. Here is my question though, I am being picky and the resulting string is long and ugly. The real question here is from a python script how do I move the table from its source to my Geodatabase for future manipulation and preserve the original values in the "Cust_No" field. I saw some stuff on Field Maps but I couldn't get it to work, I was getting an error stating "No such file or directory: '(working file path here)'
... View more
02-25-2019
11:13 AM
|
0
|
0
|
166
|
POST
|
Ok this makes sense. I think I was going the export/build/import route to avoid that exact risk of overwriting everything. In another script I have used the Get Count tool after the Selection tool which I then feed into the Stop (When inputs are false) tool to help prevent the above mentioned possibility. If each value is supposed to be unique then I should only return either a 0 or a 1. Is this an adequate method of trying to avoid that scenario or is there another better method of preventing that?
... View more
02-15-2019
10:02 AM
|
1
|
1
|
280
|
POST
|
I am trying to update a single entry in a feature class with new data from a work order. I have a feature class that contains all of the meter's in within an area. When the crew goes out into the field and change out a part they bring me a work order with the new serial number, model etc. Is there a way in model builder to select the single entry to be modified and update it with these new values? So far the only method I have come up with was to create a new feature class with the Select tool, then using the Calculate Field tool update each field. The problem has been getting this data back into the source feature class. I was trying to avoid a situation where I delete the old record and append the newly created one if possible.
... View more
02-05-2019
03:12 PM
|
0
|
4
|
349
|
Title | Kudos | Posted |
---|---|---|
1 | 02-15-2019 10:02 AM |
Online Status |
Offline
|
Date Last Visited |
02-26-2024
09:53 AM
|