{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/components/pulls/comments/196030459","pull_request_review_id":129498011,"id":196030459,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjAzMDQ1OQ==","diff_hunk":"@@ -0,0 +1,202 @@\n+// ============================================================================\r\n+//\r\n+// Copyright (C) 2006-2018 Talend Inc. - www.talend.com\r\n+//\r\n+// This source code is available under agreement available at\r\n+// %InstallDIR%\\features\\org.talend.rcp.branding.%PRODUCTNAME%\\%PRODUCTNAME%license.txt\r\n+//\r\n+// You should have received a copy of the agreement\r\n+// along with this program; if not, write to Talend SA\r\n+// 9 rue Pages 92150 Suresnes, France\r\n+//\r\n+// ============================================================================\r\n+package org.talend.components.common.tableaction;\r\n+\r\n+import org.apache.avro.Schema;\r\n+import org.slf4j.Logger;\r\n+import org.slf4j.LoggerFactory;\r\n+import org.talend.daikon.avro.SchemaConstants;\r\n+\r\n+import java.security.InvalidParameterException;\r\n+import java.util.ArrayList;\r\n+import java.util.List;\r\n+\r\n+public class DefaultSQLCreateTableAction extends TableAction {\r\n+\r\n+    private final Logger log = LoggerFactory.getLogger(DefaultSQLCreateTableAction.class);\r\n+\r\n+    private String table;\r\n+\r\n+    private Schema schema;\r\n+\r\n+    private boolean drop;\r\n+\r\n+    private boolean createIfNotExists;\r\n+    private boolean dropIfExists;\r\n+\r\n+    public DefaultSQLCreateTableAction(final String table, final Schema schema, boolean createIfNotExists, boolean drop,\r\n+            boolean dropIfExists) {\r\n+        if (table == null || table.isEmpty()) {\r\n+            throw new InvalidParameterException(\"Table name can't null or empty\");\r","path":"core/components-common/src/main/java/org/talend/components/common/tableaction/DefaultSQLCreateTableAction.java","position":40,"original_position":40,"commit_id":"d57611e203c3503e5c1c306213485bed851224ab","original_commit_id":"d57611e203c3503e5c1c306213485bed851224ab","user":{"login":"mbasiuk-talend","id":26868223,"node_id":"MDQ6VXNlcjI2ODY4MjIz","avatar_url":"https://avatars1.githubusercontent.com/u/26868223?v=4","gravatar_id":"","url":"https://api.github.com/users/mbasiuk-talend","html_url":"https://github.com/mbasiuk-talend","followers_url":"https://api.github.com/users/mbasiuk-talend/followers","following_url":"https://api.github.com/users/mbasiuk-talend/following{/other_user}","gists_url":"https://api.github.com/users/mbasiuk-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/mbasiuk-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbasiuk-talend/subscriptions","organizations_url":"https://api.github.com/users/mbasiuk-talend/orgs","repos_url":"https://api.github.com/users/mbasiuk-talend/repos","events_url":"https://api.github.com/users/mbasiuk-talend/events{/privacy}","received_events_url":"https://api.github.com/users/mbasiuk-talend/received_events","type":"User","site_admin":false},"body":"The same about **be** if you agree in previous comment.","created_at":"2018-06-18T10:26:32Z","updated_at":"2018-06-18T10:48:45Z","html_url":"https://github.com/Talend/components/pull/1301#discussion_r196030459","pull_request_url":"https://api.github.com/repos/Talend/components/pulls/1301","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/comments/196030459"},"html":{"href":"https://github.com/Talend/components/pull/1301#discussion_r196030459"},"pull_request":{"href":"https://api.github.com/repos/Talend/components/pulls/1301"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/components/pulls/1301","id":195472445,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDcyNDQ1","html_url":"https://github.com/Talend/components/pull/1301","diff_url":"https://github.com/Talend/components/pull/1301.diff","patch_url":"https://github.com/Talend/components/pull/1301.patch","issue_url":"https://api.github.com/repos/Talend/components/issues/1301","number":1301,"state":"open","locked":false,"title":" feat(TDI-40561) : Support of table actions for snowflake","user":{"login":"ypiel-talend","id":29707101,"node_id":"MDQ6VXNlcjI5NzA3MTAx","avatar_url":"https://avatars2.githubusercontent.com/u/29707101?v=4","gravatar_id":"","url":"https://api.github.com/users/ypiel-talend","html_url":"https://github.com/ypiel-talend","followers_url":"https://api.github.com/users/ypiel-talend/followers","following_url":"https://api.github.com/users/ypiel-talend/following{/other_user}","gists_url":"https://api.github.com/users/ypiel-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/ypiel-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypiel-talend/subscriptions","organizations_url":"https://api.github.com/users/ypiel-talend/orgs","repos_url":"https://api.github.com/users/ypiel-talend/repos","events_url":"https://api.github.com/users/ypiel-talend/events{/privacy}","received_events_url":"https://api.github.com/users/ypiel-talend/received_events","type":"User","site_admin":false},"body":"**What is the current behavior?** (You can also link to an open issue here)\r\nhttps://jira.talendforge.org/browse/TDI-40561\r\n\r\n**What is the new behavior?**\r\nThere is a new action on table in snowflake output property to create table on the fly, truncate, drop, etc...\r\n\r\n\r\n**Please check if the PR fulfills these requirements**\r\n\r\n- [ ] The commit message follows Talend standard\r\n- [ ] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features) ?\r\n- [ ] The code coverage on new code >75%\r\n- [ ] The new code does not introduce new technical issues (sonar / eslint)\r\n\r\n**What kind of change does this PR introduce?**\r\n\r\n- [ ] Bugfix\r\n- [x] Feature\r\n- [ ] Code style update (formatting, local variables)\r\n- [ ] Refactoring (no functional changes, no api changes)\r\n- [ ] Build / CI related changes\r\n- [ ] Other... Please describe:\r\n\r\n**Does this PR introduce a breaking change?**\r\n\r\n- [ ] Yes\r\n- [ ] No\r\n\r\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\r\n\r\n\r\n**Other information**:\r\n","created_at":"2018-06-18T09:49:18Z","updated_at":"2018-06-18T10:48:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1d7e03e3053c03ee28f938a7432a79e0376c88f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/components/pulls/1301/commits","review_comments_url":"https://api.github.com/repos/Talend/components/pulls/1301/comments","review_comment_url":"https://api.github.com/repos/Talend/components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/components/issues/1301/comments","statuses_url":"https://api.github.com/repos/Talend/components/statuses/d57611e203c3503e5c1c306213485bed851224ab","head":{"label":"Talend:ypiel/TDI-40561_snowflake_action_on_table","ref":"ypiel/TDI-40561_snowflake_action_on_table","sha":"d57611e203c3503e5c1c306213485bed851224ab","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","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":39855061,"node_id":"MDEwOlJlcG9zaXRvcnkzOTg1NTA2MQ==","name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","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/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2018-06-15T09:45:14Z","pushed_at":"2018-06-18T09:51:13Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":17714,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":42,"open_issues":17,"watchers":24,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"f72db9a3814cca9586f8c5127c655cf67077ce35","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","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":39855061,"node_id":"MDEwOlJlcG9zaXRvcnkzOTg1NTA2MQ==","name":"components","full_name":"Talend/components","owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","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/components","description":"Talend component infrastructure and public components","fork":false,"url":"https://api.github.com/repos/Talend/components","forks_url":"https://api.github.com/repos/Talend/components/forks","keys_url":"https://api.github.com/repos/Talend/components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/components/teams","hooks_url":"https://api.github.com/repos/Talend/components/hooks","issue_events_url":"https://api.github.com/repos/Talend/components/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/components/events","assignees_url":"https://api.github.com/repos/Talend/components/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/components/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/components/tags","blobs_url":"https://api.github.com/repos/Talend/components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/components/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/components/languages","stargazers_url":"https://api.github.com/repos/Talend/components/stargazers","contributors_url":"https://api.github.com/repos/Talend/components/contributors","subscribers_url":"https://api.github.com/repos/Talend/components/subscribers","subscription_url":"https://api.github.com/repos/Talend/components/subscription","commits_url":"https://api.github.com/repos/Talend/components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/components/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/components/merges","archive_url":"https://api.github.com/repos/Talend/components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/components/downloads","issues_url":"https://api.github.com/repos/Talend/components/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/components/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/components/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/components/labels{/name}","releases_url":"https://api.github.com/repos/Talend/components/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/components/deployments","created_at":"2015-07-28T20:02:50Z","updated_at":"2018-06-15T09:45:14Z","pushed_at":"2018-06-18T09:51:13Z","git_url":"git://github.com/Talend/components.git","ssh_url":"git@github.com:Talend/components.git","clone_url":"https://github.com/Talend/components.git","svn_url":"https://github.com/Talend/components","homepage":null,"size":17714,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":42,"open_issues":17,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/components/pulls/1301"},"html":{"href":"https://github.com/Talend/components/pull/1301"},"issue":{"href":"https://api.github.com/repos/Talend/components/issues/1301"},"comments":{"href":"https://api.github.com/repos/Talend/components/issues/1301/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/components/pulls/1301/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/components/pulls/1301/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/components/statuses/d57611e203c3503e5c1c306213485bed851224ab"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mbasiuk-talend"}}