sqlflow_public/sqlflowjs/sqlflow.js_get_start.html

88 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SQLFlow: Visualize column impact and data lineage to track columns across transformations by analyzing SQL query.</title>
<meta name="description" content="SQLFlow: Visualize column impact and data lineage to track columns across transformations by analyzing SQL query. supported databases: bigquery, couchbase, dax, db2, greenplum, hana, hive, impala, informix, mdx, mysql, netezza, openedge, oracle, postgresql, redshift, snowflake, sqlserver, sybase, teradata, vertica">
<meta name="keywords" content="Analyzing SQL script, table, column, impact, data lineage, bigquery, couchbase, dax, db2, greenplum, hana, hive, impala, informix, mdx, mysql, netezza, openedge, oracle, postgresql, redshift, snowflake, sqlserver, sybase, teradata, vertica">
<meta name="author" content="Gudu Software">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js" integrity="sha256-spTpc4lvj4dOkKjrGokIrHkJgNA0xMS98Pw9N7ir9oI=" crossorigin="anonymous"></script>
<script type="text/javascript" src="sqlflow.js"></script>
<link href="sqlflow.css" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
height: 100%;
}
body {
font-family: Arial, sans-serif;
height: 100%;
-webkit-font-smoothing: antialiased;
}
#app{
width: 100%;
height: 100%;
background: #eee;
position: relative;
}
</style>
</head>
<body>
<div id="app"></div>
</body>
<script>
$(function () {
var sqlflow = new SQLFlow({
el: document.getElementById("app"),
});
sqlflow.setDbvendor("oracle");
sqlflow.setSQLText("CREATE VIEW vsal \n" +
"AS \n" +
" SELECT a.deptno \"Department\", \n" +
" a.num_emp / b.total_count \"Employees\", \n" +
" a.sal_sum / b.total_sal \"Salary\" \n" +
" FROM (SELECT deptno, \n" +
" Count() num_emp, \n" +
" SUM(sal) sal_sum \n" +
" FROM scott.emp \n" +
" WHERE city = 'NYC' \n" +
" GROUP BY deptno) a, \n" +
" (SELECT Count() total_count, \n" +
" SUM(sal) total_sal \n" +
" FROM scott.emp \n" +
" WHERE city = 'NYC') b \n" +
";\n" +
"\n" +
"INSERT ALL\n" +
"\tWHEN ottl < 100000 THEN\n" +
"\t\tINTO small_orders\n" +
"\t\t\tVALUES(oid, ottl, sid, cid)\n" +
"\tWHEN ottl > 100000 and ottl < 200000 THEN\n" +
"\t\tINTO medium_orders\n" +
"\t\t\tVALUES(oid, ottl, sid, cid)\n" +
"\tWHEN ottl > 200000 THEN\n" +
"\t\tinto large_orders\n" +
"\t\t\tVALUES(oid, ottl, sid, cid)\n" +
"\tWHEN ottl > 290000 THEN\n" +
"\t\tINTO special_orders\n" +
"SELECT o.order_id oid, o.customer_id cid, o.order_total ottl,\n" +
"o.sales_rep_id sid, c.credit_limit cl, c.cust_email cem\n" +
"FROM orders o, customers c\n" +
"WHERE o.customer_id = c.customer_id;");
sqlflow.visualize();
});
</script>
</html>