| A Simple Extract-Transfer-Load Example | | We populate two tables, A and B, extract a join, and transfer the results | to a table C. In the process, we show a row-count to the user. url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:etl0a port:3306 id:mysql password:mysqlmysql ----------------------------------------------------------------------------------------------------- table A has a row some-x some-y url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:etl0b port:3306 id:mysql password:mysqlmysql ----------------------------------------------------------------------------------------------------- table B has a row some-y some-z url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:etl0c port:3306 id:mysql password:mysqlmysql ----------------------------------------------------------------------------------------------------- table C has a row some-x some-z count : add to the result table C a row some-x some-z = some-number ------------------------------------------------------------------- Extract Transfer and Load that-number rows into the result table C table C has a row some-x some-z ------------------------------------------ the result table C has a row that-x that-z the result of joining tables A and B has a row some-x some-z add : table C has a row that-x that-z --------------------------------------------- add to the result table C a row that-x that-z table C has a row some-x some-z del : table C has a row that-x that-z ----------------------------------------- remove the row that-x that-z from table C table A has a row some-x some-y table B has a row that-y some-z ------------------------------------------------------------ the result of joining tables A and B has a row that-x that-z some-table should be in tablespace some-tablespace that-table should have a column some-colnumber some-colname some-coltype create sql table : that-table that-colnumber that-colname that-coltype that-tablespace ------------------------------------------------------------------------------------- create a table with heading -- that-table -- in tablespace that-tablespace that-colnumber that-colname that-coltype some-table should have a column some-number some-name some-type drop sql table : that-table ---------------------------------------- remove the the sql table -- that-table this-table should be in tablespace this-tablespace ================================================== table A has a row some-x some-y users table B has a row some-y some-z users table C has a row some-x some-z users this-table should have a column this-number this-name this-type ==================================================================== table A has a row some-x some-y 1 X INT(8) table A has a row some-x some-y 2 Y INT(8) table B has a row some-y some-z 1 Y INT(8) table B has a row some-y some-z 2 Z INT(8) table C has a row some-x some-z 1 X INT(8) table C has a row some-x some-z 2 Z INT(8) table A should contain an entry this-x this-y ============================================= 1 11 2 12 table B should contain an entry this-y this-z ============================================= 11 111 11 112 12 121 12 122 table some-AB should contain an entry some-x some-y add : table that-AB has a row that-x that-y --------------------------------------------------- add to table that-AB the entry that-x that-y