{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/comments/57443979","id":57443979,"diff_hunk":"@@ -299,10 +392,86 @@ public static MetadataTable convertFromAvro(org.apache.avro.Schema in) {\n         for (Schema.Field f : in.getFields()) {\n             columns.add(convertFromAvro(f));\n         }\n+        boolean isDynamic = AvroUtils.isIncludeAllFields(in);\n+        if (isDynamic) {\n+            org.talend.core.model.metadata.builder.connection.MetadataColumn col = convertFromAvroForDynamic(in);\n+            // get dynamic position\n+            int dynPosition = Integer.valueOf(in.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_POSITION));\n+            columns.add(dynPosition, col);\n+        }\n         table.getColumns().addAll(columns);\n         return table;\n     }\n \n+    public static org.talend.core.model.metadata.builder.connection.MetadataColumn convertFromAvroForDynamic(Schema schema) {\n+        org.talend.core.model.metadata.builder.connection.MetadataColumn col = ConnectionFactory.eINSTANCE.createMetadataColumn();\n+        String prop;\n+        if (null != (prop = schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_ID))) {\n+            col.setId(prop);\n+        }\n+\n+        if (null != (prop = schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_COMMENT))) {\n+            col.setComment(prop);\n+        }\n+        if (null != (prop = schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_COLUMN_NAME))) {\n+            col.setLabel(prop);\n+        }\n+        if (null != (prop = schema.getProp(Talend6SchemaConstants.TALEND6_DYNAMIC_IS_READ_ONLY))) {\n+            col.setReadOnly(Boolean.parseBoolean(prop));\n+        }\n+        for (String key : schema.getJsonProps().keySet()) {\n+            if (key.startsWith(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {\n+                String originalKey = key.substring(Talend6SchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());\n+                TaggedValue tv = TaggedValueHelper.createTaggedValue(originalKey, schema.getProp(key));\n+                col.getTaggedValue().add(tv);\n+            }\n+        }\n+\n+        // Column-specific properties.","path":"main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/metadata/MetadataToolAvroHelper.java","position":191,"original_position":191,"commit_id":"7b8cee7a8483a04ed8acc3cd748a9d01b284cf4b","original_commit_id":"7b8cee7a8483a04ed8acc3cd748a9d01b284cf4b","user":{"login":"RyanSkraba","id":7744819,"avatar_url":"https://avatars.githubusercontent.com/u/7744819?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanSkraba","html_url":"https://github.com/RyanSkraba","followers_url":"https://api.github.com/users/RyanSkraba/followers","following_url":"https://api.github.com/users/RyanSkraba/following{/other_user}","gists_url":"https://api.github.com/users/RyanSkraba/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSkraba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSkraba/subscriptions","organizations_url":"https://api.github.com/users/RyanSkraba/orgs","repos_url":"https://api.github.com/users/RyanSkraba/repos","events_url":"https://api.github.com/users/RyanSkraba/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSkraba/received_events","type":"User","site_admin":false},"body":"As above, aren't all of the properties below constant for dynamic columns?  I really don't know!","created_at":"2016-03-25T13:35:02Z","updated_at":"2016-03-25T13:35:02Z","html_url":"https://github.com/Talend/tcommon-studio-se/pull/341#discussion_r57443979","pull_request_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341","_links":{"self":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/comments/57443979"},"html":{"href":"https://github.com/Talend/tcommon-studio-se/pull/341#discussion_r57443979"},"pull_request":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341","id":63834691,"html_url":"https://github.com/Talend/tcommon-studio-se/pull/341","diff_url":"https://github.com/Talend/tcommon-studio-se/pull/341.diff","patch_url":"https://github.com/Talend/tcommon-studio-se/pull/341.patch","issue_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/341","number":341,"state":"open","locked":false,"title":"[TCOMP-87] fixed the dynamic column issue","user":{"login":"bchen-talend","id":7734020,"avatar_url":"https://avatars.githubusercontent.com/u/7734020?v=3","gravatar_id":"","url":"https://api.github.com/users/bchen-talend","html_url":"https://github.com/bchen-talend","followers_url":"https://api.github.com/users/bchen-talend/followers","following_url":"https://api.github.com/users/bchen-talend/following{/other_user}","gists_url":"https://api.github.com/users/bchen-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/bchen-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bchen-talend/subscriptions","organizations_url":"https://api.github.com/users/bchen-talend/orgs","repos_url":"https://api.github.com/users/bchen-talend/repos","events_url":"https://api.github.com/users/bchen-talend/events{/privacy}","received_events_url":"https://api.github.com/users/bchen-talend/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-23T05:48:01Z","updated_at":"2016-03-25T13:35:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e91f4deef35dde8b3324bfc2a3435650ac1570b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341/commits","review_comments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341/comments","review_comment_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/341/comments","statuses_url":"https://api.github.com/repos/Talend/tcommon-studio-se/statuses/7b8cee7a8483a04ed8acc3cd748a9d01b284cf4b","head":{"label":"Talend:TCOMP-87-Dynamic-2","ref":"TCOMP-87-Dynamic-2","sha":"7b8cee7a8483a04ed8acc3cd748a9d01b284cf4b","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":21085139,"name":"tcommon-studio-se","full_name":"Talend/tcommon-studio-se","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/tcommon-studio-se","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/tcommon-studio-se","forks_url":"https://api.github.com/repos/Talend/tcommon-studio-se/forks","keys_url":"https://api.github.com/repos/Talend/tcommon-studio-se/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/tcommon-studio-se/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/tcommon-studio-se/teams","hooks_url":"https://api.github.com/repos/Talend/tcommon-studio-se/hooks","issue_events_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/tcommon-studio-se/events","assignees_url":"https://api.github.com/repos/Talend/tcommon-studio-se/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/tcommon-studio-se/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/tcommon-studio-se/tags","blobs_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/tcommon-studio-se/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/tcommon-studio-se/languages","stargazers_url":"https://api.github.com/repos/Talend/tcommon-studio-se/stargazers","contributors_url":"https://api.github.com/repos/Talend/tcommon-studio-se/contributors","subscribers_url":"https://api.github.com/repos/Talend/tcommon-studio-se/subscribers","subscription_url":"https://api.github.com/repos/Talend/tcommon-studio-se/subscription","commits_url":"https://api.github.com/repos/Talend/tcommon-studio-se/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/tcommon-studio-se/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/tcommon-studio-se/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/tcommon-studio-se/merges","archive_url":"https://api.github.com/repos/Talend/tcommon-studio-se/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/tcommon-studio-se/downloads","issues_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/tcommon-studio-se/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/tcommon-studio-se/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/tcommon-studio-se/labels{/name}","releases_url":"https://api.github.com/repos/Talend/tcommon-studio-se/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/deployments","created_at":"2014-06-22T04:07:18Z","updated_at":"2016-03-09T06:44:52Z","pushed_at":"2016-03-25T06:34:27Z","git_url":"git://github.com/Talend/tcommon-studio-se.git","ssh_url":"git@github.com:Talend/tcommon-studio-se.git","clone_url":"https://github.com/Talend/tcommon-studio-se.git","svn_url":"https://github.com/Talend/tcommon-studio-se","homepage":null,"size":732948,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":9,"forks":45,"open_issues":9,"watchers":24,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"9ba91e9a6c76a78198e81bf00642b9dde935d79b","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":21085139,"name":"tcommon-studio-se","full_name":"Talend/tcommon-studio-se","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/tcommon-studio-se","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/tcommon-studio-se","forks_url":"https://api.github.com/repos/Talend/tcommon-studio-se/forks","keys_url":"https://api.github.com/repos/Talend/tcommon-studio-se/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/tcommon-studio-se/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/tcommon-studio-se/teams","hooks_url":"https://api.github.com/repos/Talend/tcommon-studio-se/hooks","issue_events_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/tcommon-studio-se/events","assignees_url":"https://api.github.com/repos/Talend/tcommon-studio-se/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/tcommon-studio-se/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/tcommon-studio-se/tags","blobs_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/tcommon-studio-se/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/tcommon-studio-se/languages","stargazers_url":"https://api.github.com/repos/Talend/tcommon-studio-se/stargazers","contributors_url":"https://api.github.com/repos/Talend/tcommon-studio-se/contributors","subscribers_url":"https://api.github.com/repos/Talend/tcommon-studio-se/subscribers","subscription_url":"https://api.github.com/repos/Talend/tcommon-studio-se/subscription","commits_url":"https://api.github.com/repos/Talend/tcommon-studio-se/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/tcommon-studio-se/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/tcommon-studio-se/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/tcommon-studio-se/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/tcommon-studio-se/merges","archive_url":"https://api.github.com/repos/Talend/tcommon-studio-se/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/tcommon-studio-se/downloads","issues_url":"https://api.github.com/repos/Talend/tcommon-studio-se/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/tcommon-studio-se/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/tcommon-studio-se/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/tcommon-studio-se/labels{/name}","releases_url":"https://api.github.com/repos/Talend/tcommon-studio-se/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/tcommon-studio-se/deployments","created_at":"2014-06-22T04:07:18Z","updated_at":"2016-03-09T06:44:52Z","pushed_at":"2016-03-25T06:34:27Z","git_url":"git://github.com/Talend/tcommon-studio-se.git","ssh_url":"git@github.com:Talend/tcommon-studio-se.git","clone_url":"https://github.com/Talend/tcommon-studio-se.git","svn_url":"https://github.com/Talend/tcommon-studio-se","homepage":null,"size":732948,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":9,"forks":45,"open_issues":9,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341"},"html":{"href":"https://github.com/Talend/tcommon-studio-se/pull/341"},"issue":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/341"},"comments":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/issues/341/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/pulls/341/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/tcommon-studio-se/statuses/7b8cee7a8483a04ed8acc3cd748a9d01b284cf4b"}}}}