{"action":"opened","number":1102,"pull_request":{"url":"https://api.github.com/repos/apache/nifi/pulls/1102","id":88017270,"html_url":"https://github.com/apache/nifi/pull/1102","diff_url":"https://github.com/apache/nifi/pull/1102.diff","patch_url":"https://github.com/apache/nifi/pull/1102.patch","issue_url":"https://api.github.com/repos/apache/nifi/issues/1102","number":1102,"state":"open","locked":false,"title":"NIFI-2867 The ColumnSize of datetime type is 19 length in MySQL JDBC","user":{"login":"combineads","id":3220939,"avatar_url":"https://avatars.githubusercontent.com/u/3220939?v=3","gravatar_id":"","url":"https://api.github.com/users/combineads","html_url":"https://github.com/combineads","followers_url":"https://api.github.com/users/combineads/followers","following_url":"https://api.github.com/users/combineads/following{/other_user}","gists_url":"https://api.github.com/users/combineads/gists{/gist_id}","starred_url":"https://api.github.com/users/combineads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/combineads/subscriptions","organizations_url":"https://api.github.com/users/combineads/orgs","repos_url":"https://api.github.com/users/combineads/repos","events_url":"https://api.github.com/users/combineads/events{/privacy}","received_events_url":"https://api.github.com/users/combineads/received_events","type":"User","site_admin":false},"body":"When I use the ConvertJSONToSQL, it changes the field value for data capacity of source datastore.\r\n\r\n/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ConvertJSONToSQL.java: 430 line\r\n                    if (colSize != null && fieldValue.length() > colSize) {\r\n                        fieldValue = fieldValue.substring(0, colSize);\r\n                    }\r\n\r\nBut the type of field is datetime in MySQL DB, JDBC driver returns 19 column size. So above code truncate field value to 2016-10-05 12:00:00 from 2016-10-05 12:00:00.0.\r\nPutSQL only resolve the TIMESTAMP type using yyyy-MM-dd HH:mm:ss.SSS SimpleDateFormat. So it throws below exception.\r\n\r\n2016-10-05 13:05:56,526 ERROR [Timer-Driven Process Thread-14] o.apache.nifi.processors.standard.PutSQL\r\norg.apache.nifi.processor.exception.ProcessException: The value of the sql.args.7.value is '2016-10-05 13:05:43', which cannot be converted to a timestamp\r\n        at org.apache.nifi.processors.standard.PutSQL.setParameters(PutSQL.java:630) ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.processors.standard.PutSQL.onTrigger(PutSQL.java:241) ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51]\r\n        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_51]\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_51]\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_51]\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]\r\n        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]\r\nCaused by: java.text.ParseException: Unparseable date: \"2016-10-05 13:05:43\"\r\n        at java.text.DateFormat.parse(DateFormat.java:366) ~[na:1.8.0_51]\r\n        at org.apache.nifi.processors.standard.PutSQL.setParameter(PutSQL.java:798) ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        at org.apache.nifi.processors.standard.PutSQL.setParameters(PutSQL.java:626) ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]\r\n        ... 13 common frames omitted\r\n\r\nThank you.","created_at":"2016-10-05T05:11:02Z","updated_at":"2016-10-05T05:11:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/nifi/pulls/1102/commits","review_comments_url":"https://api.github.com/repos/apache/nifi/pulls/1102/comments","review_comment_url":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/nifi/issues/1102/comments","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/e984aa9dce272b97f0cdb8e1c5b5b35e8af3a0fc","head":{"label":"combineads:NIFI-2867","ref":"NIFI-2867","sha":"e984aa9dce272b97f0cdb8e1c5b5b35e8af3a0fc","user":{"login":"combineads","id":3220939,"avatar_url":"https://avatars.githubusercontent.com/u/3220939?v=3","gravatar_id":"","url":"https://api.github.com/users/combineads","html_url":"https://github.com/combineads","followers_url":"https://api.github.com/users/combineads/followers","following_url":"https://api.github.com/users/combineads/following{/other_user}","gists_url":"https://api.github.com/users/combineads/gists{/gist_id}","starred_url":"https://api.github.com/users/combineads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/combineads/subscriptions","organizations_url":"https://api.github.com/users/combineads/orgs","repos_url":"https://api.github.com/users/combineads/repos","events_url":"https://api.github.com/users/combineads/events{/privacy}","received_events_url":"https://api.github.com/users/combineads/received_events","type":"User","site_admin":false},"repo":{"id":68908048,"name":"nifi","full_name":"combineads/nifi","owner":{"login":"combineads","id":3220939,"avatar_url":"https://avatars.githubusercontent.com/u/3220939?v=3","gravatar_id":"","url":"https://api.github.com/users/combineads","html_url":"https://github.com/combineads","followers_url":"https://api.github.com/users/combineads/followers","following_url":"https://api.github.com/users/combineads/following{/other_user}","gists_url":"https://api.github.com/users/combineads/gists{/gist_id}","starred_url":"https://api.github.com/users/combineads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/combineads/subscriptions","organizations_url":"https://api.github.com/users/combineads/orgs","repos_url":"https://api.github.com/users/combineads/repos","events_url":"https://api.github.com/users/combineads/events{/privacy}","received_events_url":"https://api.github.com/users/combineads/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/combineads/nifi","description":"Mirror of Apache NiFi","fork":true,"url":"https://api.github.com/repos/combineads/nifi","forks_url":"https://api.github.com/repos/combineads/nifi/forks","keys_url":"https://api.github.com/repos/combineads/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/combineads/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/combineads/nifi/teams","hooks_url":"https://api.github.com/repos/combineads/nifi/hooks","issue_events_url":"https://api.github.com/repos/combineads/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/combineads/nifi/events","assignees_url":"https://api.github.com/repos/combineads/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/combineads/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/combineads/nifi/tags","blobs_url":"https://api.github.com/repos/combineads/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/combineads/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/combineads/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/combineads/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/combineads/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/combineads/nifi/languages","stargazers_url":"https://api.github.com/repos/combineads/nifi/stargazers","contributors_url":"https://api.github.com/repos/combineads/nifi/contributors","subscribers_url":"https://api.github.com/repos/combineads/nifi/subscribers","subscription_url":"https://api.github.com/repos/combineads/nifi/subscription","commits_url":"https://api.github.com/repos/combineads/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/combineads/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/combineads/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/combineads/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/combineads/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/combineads/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/combineads/nifi/merges","archive_url":"https://api.github.com/repos/combineads/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/combineads/nifi/downloads","issues_url":"https://api.github.com/repos/combineads/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/combineads/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/combineads/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/combineads/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/combineads/nifi/labels{/name}","releases_url":"https://api.github.com/repos/combineads/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/combineads/nifi/deployments","created_at":"2016-09-22T09:53:04Z","updated_at":"2016-09-22T09:53:18Z","pushed_at":"2016-10-05T05:10:25Z","git_url":"git://github.com/combineads/nifi.git","ssh_url":"git@github.com:combineads/nifi.git","clone_url":"https://github.com/combineads/nifi.git","svn_url":"https://github.com/combineads/nifi","homepage":"","size":66376,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"4dbdfea5dcdf6c6ef6a70589302b1fb9b7893b3d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":27911088,"name":"nifi","full_name":"apache/nifi","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/nifi","description":"Mirror of Apache NiFi","fork":false,"url":"https://api.github.com/repos/apache/nifi","forks_url":"https://api.github.com/repos/apache/nifi/forks","keys_url":"https://api.github.com/repos/apache/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/nifi/teams","hooks_url":"https://api.github.com/repos/apache/nifi/hooks","issue_events_url":"https://api.github.com/repos/apache/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/apache/nifi/events","assignees_url":"https://api.github.com/repos/apache/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/apache/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/apache/nifi/tags","blobs_url":"https://api.github.com/repos/apache/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/nifi/languages","stargazers_url":"https://api.github.com/repos/apache/nifi/stargazers","contributors_url":"https://api.github.com/repos/apache/nifi/contributors","subscribers_url":"https://api.github.com/repos/apache/nifi/subscribers","subscription_url":"https://api.github.com/repos/apache/nifi/subscription","commits_url":"https://api.github.com/repos/apache/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/apache/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/nifi/merges","archive_url":"https://api.github.com/repos/apache/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/nifi/downloads","issues_url":"https://api.github.com/repos/apache/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/apache/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/nifi/labels{/name}","releases_url":"https://api.github.com/repos/apache/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/apache/nifi/deployments","created_at":"2014-12-12T08:00:05Z","updated_at":"2016-10-05T03:09:04Z","pushed_at":"2016-10-05T04:30:18Z","git_url":"git://github.com/apache/nifi.git","ssh_url":"git@github.com:apache/nifi.git","clone_url":"https://github.com/apache/nifi.git","svn_url":"https://github.com/apache/nifi","homepage":"","size":93292,"stargazers_count":369,"watchers_count":369,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":331,"mirror_url":"git://git.apache.org/nifi.git","open_issues_count":77,"forks":331,"open_issues":77,"watchers":369,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/nifi/pulls/1102"},"html":{"href":"https://github.com/apache/nifi/pull/1102"},"issue":{"href":"https://api.github.com/repos/apache/nifi/issues/1102"},"comments":{"href":"https://api.github.com/repos/apache/nifi/issues/1102/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/nifi/pulls/1102/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/nifi/pulls/1102/commits"},"statuses":{"href":"https://api.github.com/repos/apache/nifi/statuses/e984aa9dce272b97f0cdb8e1c5b5b35e8af3a0fc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"combineads"}}