{"id":1168885,"date":"2016-09-26T13:14:28","date_gmt":"2016-09-26T20:14:28","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/"},"modified":"2016-09-26T13:14:28","modified_gmt":"2016-09-26T20:14:28","slug":"csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/","title":{"rendered":"CSV Import of Venues then Organizers, and trying to fit our setup"},"content":{"rendered":"<p>Basically, we had a very old somewhat convoluted database setup. The old website shows event listings for mud runs \/ obstacle course races.<\/p>\n<p>In the old setup, the races themselves were in one table, address information was tied into the races themselves, and the main companies who ran series of events was information that had to be extracted from a column, reformatted, and parsed for duplicates.<\/p>\n<p>So, making an Organizer Table was simple enough. We took just the name of the overall company\/series responsive, and borrowed some meta information  from the race to appease those fields in the Organizer CSV. Everything&#8217;s great there, because there&#8217;s no dependency on time or location.<\/p>\n<p>Then, to make a Venue List, before there weren&#8217;t names of the places on file.  It was, <\/p>\n<p>Event Name<br \/>\n123 Fake St.<br \/>\nNotrealstown, OK<\/p>\n<p>and it was -not-<\/p>\n<p>Event Name<br \/>\nPretend Civic Center and Fairgrounds<br \/>\n123 Fake St.<br \/>\nNotrealstown, OK<\/p>\n<p>(as an example =)<\/p>\n<p>But we needed the address data to fit into the hierarchy here of this plug-in, especially to get automated stuff done here, like showing maps, finding -by- map, geolocation, etc.<\/p>\n<p>Based on what we&#8217;d seen of the individual Edit Event screens, it looked like you had to assign each event to a venue, by name. So it didn&#8217;t make sense to try importing without names at all. How would the event reference the venue?<\/p>\n<p>So, to get it to work at all, I thought, maybe I&#8217;ll just name them something similar, like I did for Organizers. With a conventional WordPress post, I can call two pages About, and it differentiates between them by changing the URL (like \/about-2\/) and you rarely run into issues with referring to it by name and them having the same name&#8230;.maybe a drop-down here or there, or adding them to the menu if you haven&#8217;t made a parent\/child relationship.<\/p>\n<p>So I go to import Venues, and there are ~6200 events, and each had address info attached to the event in the old site (even though there&#8217;s likely some overlap if one place holds two races over time)&#8230;so there were ~6200 venues. Not amazingly efficient, but at least a 1:1 relationship ensured accuracy.<\/p>\n<p>When the Import is complete, over 1200 Venues imported (&#8220;inserted&#8221;) and the rest are updates, presumably because, as that screen says, it detected duplicates, like having similar titles.<\/p>\n<p>Unsurprisingly, the event imports went a similar way, with ~4500 real entries, and the remainder being updates that got overwritten.<\/p>\n<p>As a result, every piece of information is filled out on the site, but there&#8217;s a mismatch between two events occuring on the same day in different places now being smooshed down to one event&#8230;.or an event that should be in Canada on one date having the location for an earlier version of that event which took place in Florida (because, after the import process was through, Florida was the last surviving update\/overwrite of that identical &#8220;venue name&#8221;\u2014which was, as a reminder, just the race name used for a name field  for Venu Name, to make sure all fields were there, including the addresses, for the original import).<\/p>\n<p>So my question is two-fold:<\/p>\n<p>1.) Is there some workable mechanism to prevent a duplicate from updating an existing field unless -every single field- is identical? (We&#8217;ve tried helping things along by adding new fields, like &#8220;Event ID&#8221; and &#8220;Promo Code&#8221; from the old site)&#8230;<\/p>\n<p>..and..<\/p>\n<p>2.) We can do it the right way from here on out, actually specifying the venue name as we learn it and apply it, for all future races&#8230;but do you have any suggestions as far as how to make the import data nice beforehand to make sure we avoid the issue?<\/p>\n<p>I&#8217;m not in love with parsing the database and calling every venue, for example, &#8220;John Irving Park,&#8221; &#8220;John Irving Park-2,&#8221; &#8220;John Irving Park-3,&#8221; etc. just for the sake of unique values.<\/p>\n<p>I know Recurring Events has a system in place to deal with the same thing happening in multiple times\/places, but that seems like it&#8217;s for regularly scheduled things, not events that might take place sporadically three to five times scattered across the year.<\/p>\n<p>I just need some guidance on how to set things up to &#8220;talk to&#8221; the plug-in correctly in a way that it can handle our needs.<\/p>\n<p>Thanks for reading thus far, and I&#8217;m happy to attach any CSVs once I can do so privately.<\/p>\n<p>Cheers,<br \/>\nVincent J.<\/p>\n","protected":false},"template":"","class_list":["post-1168885","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CSV Import of Venues then Organizers, and trying to fit our setup -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSV Import of Venues then Organizers, and trying to fit our setup -\" \/>\n<meta property=\"og:description\" content=\"Basically, we had a very old somewhat convoluted database setup. The old website shows event listings for mud runs \/ obstacle course races. In the old setup, the races themselves were in one table, address information was tied into the races themselves, and the main companies who ran series of events was information that had [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/\",\"name\":\"CSV Import of Venues then Organizers, and trying to fit our setup -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-09-26T20:14:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"CSV Import of Venues then Organizers, and trying to fit our setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSV Import of Venues then Organizers, and trying to fit our setup -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/","og_locale":"en_US","og_type":"article","og_title":"CSV Import of Venues then Organizers, and trying to fit our setup -","og_description":"Basically, we had a very old somewhat convoluted database setup. The old website shows event listings for mud runs \/ obstacle course races. In the old setup, the races themselves were in one table, address information was tied into the races themselves, and the main companies who ran series of events was information that had [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/","name":"CSV Import of Venues then Organizers, and trying to fit our setup -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-09-26T20:14:28+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/csv-import-of-venues-then-organizers-and-trying-to-fit-our-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"CSV Import of Venues then Organizers, and trying to fit our setup"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1168885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1168885\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1168885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}