Model Builder operation issue

1146
3
Jump to solution
07-09-2020 06:51 PM
JackCharde1
New Contributor III

Hey everyone, this is my first GeoNet post so forgive me if I've asked my questions in the wrong place! 

The goal of my current project is to create a map animation of global COVID-19 case numbers, where the animation shows changing daily case numbers, symbolized by graduated symbols. The COVID data that I have is just a table with various data for every country, every day, since 12/31/2019. I cannot join it to a country feature class because it would be a 1:M cardinality, and I'd be unable to symbolize the data. So I've attempted to use model builder to automate the querying, joining, and exporting processes. I created one workable model that allowed me to query the COVID data, join the queried data to a country feature class, and create a permanent feature class from that. This means, however, that I would need to go in and change the date variable over and over, manually, to create new feature classes for each date. So, I tried to understand the use of - and then utilize - iterators, to create everything I wanted with one button click.

I tried the Iterate Field Values iterator, so that the model would take each date (of which there are 230+ records for each date, because each country is represented in the table), and create a new table from it. Then the model would join that date table to the country feature class, and create a new permanent feature class. This new FC I would use for my animation. However, I received an error at the iterator part of the model, and cannot figure out how to fix it (one error is an unexpected error that needs a bug report submitted). I've attached photos of the model, error window, and COVID table snippet.

This is my first time using model builder, and I know I'm doing something wrong. Any help would be appreciated! And, let me know what other info you may need, as I'm sure what I've provided is not exhaustive.

   

0 Kudos
1 Solution

Accepted Solutions
JackCharde1
New Contributor III

SOLVED!

Thanks to Esri's Shitij Mehta, who presented the Model Builder: Tips and Tricks technical workshop today at Esri's User Conference 2020 and answered my question posted here in this thread.

Instead of using the Create Table tool, she suggested I use Copy Rows, which worked! The image below is of the final model.

View solution in original post

3 Replies
JackCharde1
New Contributor III

UPDATE (but with issues still)!

I've figured out how to get the entire model to run successfully. I used Iterate Row Selection, which allows me to group records by the unique values of a particular field, create a Table View, and use that view for other geoprocessing tools. So now I can group the COVID tabular data by date, create a new table, and join that table to my Countries feature class. When looking at the attributes for the final output feature class created by the model, all of the fields from both the Countries and COVID-19 attribute tables are there, but all COVID-19 fields are <Null>. So I checked the tables created by the Iterate and Create Table, and they are ALL empty.

I am not sure why the output of the Create Table tool is empty, but maybe it has to do with the Iterate tool?

Any suggestions would be much appreciated!

(Below is an image of my updated model!)Updated model with a different iterator.

0 Kudos
JackCharde1
New Contributor III

SOLVED!

Thanks to Esri's Shitij Mehta, who presented the Model Builder: Tips and Tricks technical workshop today at Esri's User Conference 2020 and answered my question posted here in this thread.

Instead of using the Create Table tool, she suggested I use Copy Rows, which worked! The image below is of the final model.

JackCharde1
New Contributor III

I actually ended up having this solution fail! So frustrating! (created a new post with an updated model and pictures)

It did correctly iterate through the non-spatial table and give me an individual table for each day. However, it did not join each day to my countries shapefile. Instead, it kept attaching the 12/31/2019 table to the countries.shp, and I don't know why.

This is the newer post with updates and persisting issues

0 Kudos