{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/transformation-bundle/issues/94","repository_url":"https://api.github.com/repos/keboola/transformation-bundle","labels_url":"https://api.github.com/repos/keboola/transformation-bundle/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/keboola/transformation-bundle/issues/94/comments","events_url":"https://api.github.com/repos/keboola/transformation-bundle/issues/94/events","html_url":"https://github.com/keboola/transformation-bundle/issues/94","id":293303684,"number":94,"title":"SQLdep refactoring + query validation (+ graph refactoring)","user":{"login":"ondrejhlavacek","id":497675,"avatar_url":"https://avatars1.githubusercontent.com/u/497675?v=4","gravatar_id":"","url":"https://api.github.com/users/ondrejhlavacek","html_url":"https://github.com/ondrejhlavacek","followers_url":"https://api.github.com/users/ondrejhlavacek/followers","following_url":"https://api.github.com/users/ondrejhlavacek/following{/other_user}","gists_url":"https://api.github.com/users/ondrejhlavacek/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejhlavacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejhlavacek/subscriptions","organizations_url":"https://api.github.com/users/ondrejhlavacek/orgs","repos_url":"https://api.github.com/users/ondrejhlavacek/repos","events_url":"https://api.github.com/users/ondrejhlavacek/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejhlavacek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ondrejhlavacek","id":497675,"avatar_url":"https://avatars1.githubusercontent.com/u/497675?v=4","gravatar_id":"","url":"https://api.github.com/users/ondrejhlavacek","html_url":"https://github.com/ondrejhlavacek","followers_url":"https://api.github.com/users/ondrejhlavacek/followers","following_url":"https://api.github.com/users/ondrejhlavacek/following{/other_user}","gists_url":"https://api.github.com/users/ondrejhlavacek/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejhlavacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejhlavacek/subscriptions","organizations_url":"https://api.github.com/users/ondrejhlavacek/orgs","repos_url":"https://api.github.com/users/ondrejhlavacek/repos","events_url":"https://api.github.com/users/ondrejhlavacek/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejhlavacek/received_events","type":"User","site_admin":false},"assignees":[{"login":"ondrejhlavacek","id":497675,"avatar_url":"https://avatars1.githubusercontent.com/u/497675?v=4","gravatar_id":"","url":"https://api.github.com/users/ondrejhlavacek","html_url":"https://github.com/ondrejhlavacek","followers_url":"https://api.github.com/users/ondrejhlavacek/followers","following_url":"https://api.github.com/users/ondrejhlavacek/following{/other_user}","gists_url":"https://api.github.com/users/ondrejhlavacek/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejhlavacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejhlavacek/subscriptions","organizations_url":"https://api.github.com/users/ondrejhlavacek/orgs","repos_url":"https://api.github.com/users/ondrejhlavacek/repos","events_url":"https://api.github.com/users/ondrejhlavacek/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejhlavacek/received_events","type":"User","site_admin":false}],"milestone":null,"comments":58,"created_at":"2018-01-31T20:39:59Z","updated_at":"2018-03-09T11:05:36Z","closed_at":null,"author_association":"OWNER","body":"Jedná se o dvě části. První je vyhození současný integrace SQLdepu (vizuální zobrazení queries) z transformací ven a druhá je zapojení nový featury SQLdepu pro validaci queries na frontendu.\r\n\r\nO integraci se SQLdepem se stará tahle classa - https://github.com/keboola/transformation-bundle/blob/master/library/Keboola/Transformation/SqlDep.php. API je jednoduchý (https://sqldep.docs.apiary.io/), co je složitější je sestavení queries. Kromě samotnejch queries transformace se tam ještě sestavují table definitions z input mappingu, tj. každej input mapping se převede na `CREATE TABLE` statement, včetně sloupců a datovejch typů uvedenejch v konfiguraci transformace.\r\n\r\nValidace queries bude totéž dělat i s output mappingem, ale tam bude stačit poslat `SELECT` statementy. \r\n\r\nSQLdep podporuje Redshift i Snowflake, existující featuru bychom měli zachovat pro oboje, novou ideálně taky, neměla by to bejt žádná práce navíc. \r\n\r\nSample payload\r\n\r\n```\r\n{\r\n  \"userAccountId\": \"***\",\r\n  \"dialect\": \"snowflake\",\r\n  \"customSqlSetName\": \"***\",\r\n  \"queries\": [\r\n    {\r\n      \"id\": \"0\",\r\n      \"executionUser\": \"public\",\r\n      \"name\": \"330087332 #0\",\r\n      \"sourceCode\": \"CREATE TABLE \\\"data\\\" (\\\"col1\\\" STRING)\"\r\n    },\r\n    {\r\n      \"id\": \"4\",\r\n      \"executionUser\": \"public\",\r\n      \"name\": \"330087332 #4\",\r\n      \"sourceCode\": \"CREATE TABLE \\\"out\\\"\\n  AS\\n    SELECT\\n      \\\"col1\\\" FROM \\\"data\\\";\"\r\n    }\r\n  ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/keboola/transformation-bundle/issues/comments/371783041","html_url":"https://github.com/keboola/transformation-bundle/issues/94#issuecomment-371783041","issue_url":"https://api.github.com/repos/keboola/transformation-bundle/issues/94","id":371783041,"user":{"login":"JakubMatejka","id":215660,"avatar_url":"https://avatars2.githubusercontent.com/u/215660?v=4","gravatar_id":"","url":"https://api.github.com/users/JakubMatejka","html_url":"https://github.com/JakubMatejka","followers_url":"https://api.github.com/users/JakubMatejka/followers","following_url":"https://api.github.com/users/JakubMatejka/following{/other_user}","gists_url":"https://api.github.com/users/JakubMatejka/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubMatejka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubMatejka/subscriptions","organizations_url":"https://api.github.com/users/JakubMatejka/orgs","repos_url":"https://api.github.com/users/JakubMatejka/repos","events_url":"https://api.github.com/users/JakubMatejka/events{/privacy}","received_events_url":"https://api.github.com/users/JakubMatejka/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T11:05:36Z","updated_at":"2018-03-09T11:05:36Z","author_association":"OWNER","body":"@ondrejhlavacek Přidal jsem to do těch kbc konfigů v s3. Co se týče ui, tak do toho bych se raději nepouštěl. ;o) Pokud to moc neva.\r\nA ještě asi jedna drobnost, ty nově generovaný linky vyžadují login, ale ty stávající z KBC ne. Na to je nějakej parametr v API?"}}
{"actor":{"display_login":"JakubMatejka"}}