This might be a stupid question but is it possible to add multiple tables in ArcGIS Modelbuilder together? Just add 2 tables together, like a spreadsheet list without a common factor? I have been googling this for ages and all the methods seems to require some common factor?
For example:
Table 1: x | 2 z | 5
Table 2: a | 10 c | 13
Combined Supertable: x | 2 z | 5 a | 10 c | 13
-
My dummy table failed, I tried to make it vertical but it got converted to horizontal.MSS– MSS2016年04月14日 07:47:10 +00:00Commented Apr 14, 2016 at 7:47
-
Okay so I am almost done with my model. Currently I have 13 different tables as final output. Now I only need to merge all of them into 1 table (as I previosly asked about). Is this not possible in ArcGIS modelbuilder? Should I look into different methods, such as excel functions and/or python script?MSS– MSS2016年04月18日 12:08:26 +00:00Commented Apr 18, 2016 at 12:08
1 Answer 1
Create an arbitrary common factor in each table. For example, in each table create a column called "Merge". Make it an integer short field. Now open the Calculate Field Tool. Click the expression box and in the code block insert the code below. In the Pre logic script code type: autoIncrement()
rec=0
def autoIncrement():
global rec
pStart = 1
pInterval = 1
if (rec == 0):
rec = pStart
else:
rec += pInterval
return rec
You could put this calculate field tool into your model, one for each table. Now, you could then use the Merge Tool and use this common arbitrary field. The code I gave you will populate the field in each table with incremental values in each row.
Without seeing your model, this is my first suggestion.
-
Thanks for reply! Yeah I was thinking about doing something along those lines, however 1 issue is the fact that not all of these tables that Im merging have the same columns. However I would still like to have the various tables stacked if possible. Hence I think this approach would bombard me with cells with "Null" values. Thoughts?MSS– MSS2016年04月25日 05:57:06 +00:00Commented Apr 25, 2016 at 5:57
-
You say "the same columns", but do you mean the same number of columns?Pura Vida– Pura Vida2016年04月25日 12:56:40 +00:00Commented Apr 25, 2016 at 12:56
Explore related questions
See similar questions with these tags.