{"action":"created","issue":{"url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/6","repository_url":"https://api.github.com/repos/seanharr11/etlalchemy","labels_url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/6/comments","events_url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/6/events","html_url":"https://github.com/seanharr11/etlalchemy/issues/6","id":186927287,"number":6,"title":"TypeError when moving from Oracle 12C to MySQL 5.6","user":{"login":"TBusen","id":12953607,"avatar_url":"https://avatars.githubusercontent.com/u/12953607?v=3","gravatar_id":"","url":"https://api.github.com/users/TBusen","html_url":"https://github.com/TBusen","followers_url":"https://api.github.com/users/TBusen/followers","following_url":"https://api.github.com/users/TBusen/following{/other_user}","gists_url":"https://api.github.com/users/TBusen/gists{/gist_id}","starred_url":"https://api.github.com/users/TBusen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TBusen/subscriptions","organizations_url":"https://api.github.com/users/TBusen/orgs","repos_url":"https://api.github.com/users/TBusen/repos","events_url":"https://api.github.com/users/TBusen/events{/privacy}","received_events_url":"https://api.github.com/users/TBusen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-11-02T21:38:35Z","updated_at":"2016-11-20T23:32:34Z","closed_at":null,"body":"ETLAlchemySource (INFO) - \r\n        *************************\r\n        *** Total Tables: 1 ***\r\n        *************************\r\n        \r\nETLAlchemySource (INFO) - Reading Table Schema 'xxx_stat'...\r\nETLAlchemySource (INFO) - Loaded indexes and FKs for table 'xxx_stat'\r\nETLAlchemySource (INFO) - Building query to fetch all rows from xxx_stat\r\nETLAlchemySource (INFO) - Done. (4 total rows)\r\nETLAlchemySource (INFO) - Loading all rows into memory...\r\nETLAlchemySource (INFO) - Done\r\nETLAlchemySource (INFO) - (xxx_stat) VARCHAR\r\nETLAlchemySource (INFO) - Bases: ['STRING']\r\nETLAlchemySource (INFO) - Converting to -> VARCHAR(2 (maxsize: 1)\r\nETLAlchemySource (INFO) - Checking column for elimination status...\r\nETLAlchemySource (INFO) - (xxx_desc) VARCHAR\r\nETLAlchemySource (INFO) - Bases: ['STRING']\r\nETLAlchemySource (INFO) - Converting to -> VARCHAR(8 (maxsize: 8)\r\nETLAlchemySource (INFO) - Checking column for elimination status...\r\nETLAlchemySource (WARNING) - Table '{0}' already exists - not creating table, reflecting to get new changes instead..\r\nETLAlchemySource (INFO) - Transforming & Dumping 4 total rows from table 'xxx_stat' into 'C:\\Users\\busenta\\Documents/xxx_stat.sql'.\r\nETLAlchemySource (INFO) -  (xxx_stat) -- Transforming rows: 0 -> 4...(4 Total)\r\nETLAlchemySource (INFO) -  (xxx_stat) -- Dumping rows: 0 -> 4 to 'xxx_stat.sql'...(4 Total)[Table 0/1]\r\nETLAlchemySource (INFO) - Gathering unique columns for upsert.\r\nETLAlchemySource (INFO) - Unique columns are '[Column('xxx_stat', VARCHAR(length=2), table=<xxx_stat>, primary_key=True, nullable=False)]'\r\nETLAlchemySource (INFO) - Creating 'upsert' statements for '4' rows, and dumping to 'xxx_stat.sql'.\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-11-59b264de97c8> in <module>()\r\n      8 \r\n      9 mysql.addSource(ora)\r\n---> 10 mysql.migrate()\r\n\r\nC:\\Users\\me\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py27\\lib\\site-packages\\etlalchemy\\ETLAlchemyTarget.pyc in migrate(self, migrate_schema, migrate_data, migrate_fks, migrate_indexes)\r\n     84                     str(self.conn_string) + \"'\")\r\n     85             source.migrate(self.conn_string, migrate_schema=migrate_schema,\r\n---> 86                            migrate_data=migrate_data)\r\n     87             if migrate_indexes:\r\n     88                 source.add_indexes(self.conn_string)\r\n\r\nC:\\Users\\me\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py27\\lib\\site-packages\\etlalchemy\\ETLAlchemySource.pyc in migrate(self, destination_database_url, migrate_data, migrate_schema)\r\n   1117                             self.dump_data(\r\n   1118                                 T_dst_exists, T, raw_rows[startRow:endRow],\r\n-> 1119                                 pks, Session)\r\n   1120                             del raw_rows[startRow:endRow]\r\n   1121 \r\n\r\nC:\\Users\\me\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py27\\lib\\site-packages\\etlalchemy\\ETLAlchemySource.pyc in dump_data(self, T_dst_exists, T, raw_rows, pks, sessionMaker)\r\n    815                 row = raw_rows[r]\r\n    816                 for pk in pks:\r\n--> 817                     uid += str(row[self.current_ordered_table_columns[pk]])\r\n    818                 if upsertDict.get(uid):\r\n    819                     with open(data_file_path, \"a+\") as fp:\r\n\r\nTypeError: list indices must be integers, not unicode\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38900896-typeerror-when-moving-from-oracle-12c-to-mysql-5-6?utm_campaign=plugin&utm_content=tracker%2F41641218&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F41641218&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/comments/261815001","html_url":"https://github.com/seanharr11/etlalchemy/issues/6#issuecomment-261815001","issue_url":"https://api.github.com/repos/seanharr11/etlalchemy/issues/6","id":261815001,"user":{"login":"seanharr11","id":3341490,"avatar_url":"https://avatars.githubusercontent.com/u/3341490?v=3","gravatar_id":"","url":"https://api.github.com/users/seanharr11","html_url":"https://github.com/seanharr11","followers_url":"https://api.github.com/users/seanharr11/followers","following_url":"https://api.github.com/users/seanharr11/following{/other_user}","gists_url":"https://api.github.com/users/seanharr11/gists{/gist_id}","starred_url":"https://api.github.com/users/seanharr11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanharr11/subscriptions","organizations_url":"https://api.github.com/users/seanharr11/orgs","repos_url":"https://api.github.com/users/seanharr11/repos","events_url":"https://api.github.com/users/seanharr11/events{/privacy}","received_events_url":"https://api.github.com/users/seanharr11/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T23:32:34Z","updated_at":"2016-11-20T23:32:34Z","body":"Can you try to run the ``mysqlimport`` utility to load the file ? Please let me know what errors you get when you try this (an upload of the command's output would be great). You can copy the command from ETLAlchemySource line 646.\r\n\r\nBy the way, this utility can fail silently b/c I am running it via ``os.system()``. I need to update this to ``subprocess.run()`` so I can catch exceptions.\r\n\r\n"}}
{"actor":{"display_login":"seanharr11"}}