{"action":"closed","issue":{"url":"https://api.github.com/repos/agrc/forklift/issues/71","repository_url":"https://api.github.com/repos/agrc/forklift","labels_url":"https://api.github.com/repos/agrc/forklift/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/agrc/forklift/issues/71/comments","events_url":"https://api.github.com/repos/agrc/forklift/issues/71/events","html_url":"https://github.com/agrc/forklift/issues/71","id":161199681,"number":71,"title":"Sources without OBJECTID fields cause errors","user":{"login":"stdavis","id":1326248,"avatar_url":"https://avatars.githubusercontent.com/u/1326248?v=3","gravatar_id":"","url":"https://api.github.com/users/stdavis","html_url":"https://github.com/stdavis","followers_url":"https://api.github.com/users/stdavis/followers","following_url":"https://api.github.com/users/stdavis/following{/other_user}","gists_url":"https://api.github.com/users/stdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/stdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stdavis/subscriptions","organizations_url":"https://api.github.com/users/stdavis/orgs","repos_url":"https://api.github.com/users/stdavis/repos","events_url":"https://api.github.com/users/stdavis/events{/privacy}","received_events_url":"https://api.github.com/users/stdavis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/agrc/forklift/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"stdavis","id":1326248,"avatar_url":"https://avatars.githubusercontent.com/u/1326248?v=3","gravatar_id":"","url":"https://api.github.com/users/stdavis","html_url":"https://github.com/stdavis","followers_url":"https://api.github.com/users/stdavis/followers","following_url":"https://api.github.com/users/stdavis/following{/other_user}","gists_url":"https://api.github.com/users/stdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/stdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stdavis/subscriptions","organizations_url":"https://api.github.com/users/stdavis/orgs","repos_url":"https://api.github.com/users/stdavis/repos","events_url":"https://api.github.com/users/stdavis/events{/privacy}","received_events_url":"https://api.github.com/users/stdavis/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-06-20T13:51:03Z","updated_at":"2016-06-20T19:20:45Z","closed_at":"2016-06-20T19:20:45Z","body":"### Steps to reproduce\r\n1. Define a crate that is pointed at a source without an OBJECTID field (e.g. a non-SDE table).\r\n\r\n### Expected behavior\r\nThe destination table should be created on the first run with an OBJECTID fields since it's being created within a geodatabase. Then the destination table should validate on subsequent runs.\r\n\r\n### Actual behavior\r\nOn the first run the destination table is created as expected. However, on susquent runs `core.py` reports `OBJECTID` as a missing field and throws an exception when trying to check for changes. See below for the console output...\r\n```\r\nINFO 06-20 07:48:34       lift:   49 crate: interactive_map_monitoring_sites\r\nWARN 06-20 07:48:35       core:  174 Missing fields in \\\\tsclient\\stdavis\\Documents\\Projects\\deq-enviro\\scripts\\nightly\\settings\\..\\databases\\eqmairvisionp.sde\\AVData.dbo.interactive_map_monitoring_sites: OBJECTID\r\nERRO 06-20 07:48:37       core:   63 unhandled exception: Attribute column not found[42S22:[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'OBJECTID'.] for crate {   'destination': 'C:\\\\Scheduled\\\\staging\\\\DEQEnviro\\\\TempPoints.gdb\\\\interactive_map_monitoring_sites',\r\n    'destination_coordinate_system': <SpatialReference object at 0xc3a2930[0xc3393f8]>,\r\n    'destination_name': 'interactive_map_monitoring_sites',\r\n    'destination_workspace': 'C:\\\\Scheduled\\\\staging\\\\DEQEnviro\\\\TempPoints.gdb',\r\n    'geographic_transformation': 'NAD_1983_To_WGS_1984_5',\r\n    'result': (   'This crate was never processed.',\r\n                  None),\r\n    'source': '\\\\\\\\tsclient\\\\stdavis\\\\Documents\\\\Projects\\\\deq-enviro\\\\scripts\\\\nightly\\\\settings\\\\..\\\\databases\\\\eqmairvisionp.sde\\\\AVData.dbo.interactive_map_monitoring_sites',\r\n    'source_name': 'AVData.dbo.interactive_map_monitoring_sites',\r\n    'source_workspace': '\\\\\\\\tsclient\\\\stdavis\\\\Documents\\\\Projects\\\\deq-enviro\\\\scripts\\\\nightly\\\\settings\\\\..\\\\databases\\\\eqmairvisionp.sde'}\r\nTraceback (most recent call last):\r\n  File \"C:\\Python27\\ArcGIS10.3\\lib\\site-packages\\forklift\\core.py\", line 56, in update\r\n    if _has_changes(crate):\r\n  File \"C:\\Python27\\ArcGIS10.3\\lib\\site-packages\\forklift\\core.py\", line 269, in _has_changes\r\n    for destination_row, source_row in izip(f_cursor, sde_cursor):\r\nRuntimeError: Attribute column not found[42S22:[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'OBJECTID'.]\r\nINFO 06-20 07:48:37       lift:   56 result: ('Unhandled exception during update.', \"Attribute column not found[42S22:[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'OBJECTID'.]\")\r\n```\r\n"}}
{"actor":{"display_login":"stdavis"}}