12
返回列表 发新帖
楼主: 〇〇

Luciddb 0.94测试

[复制链接]
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
11#
 楼主| 发表于 2012-9-29 20:18 | 只看该作者
What does a complete ETL lifecycle look like?

This is a real-life example and may need to be adjusted if you are using MERGE updates, in which case you will not drop tables etc. You also would have data warehouse labels as an option for providing consistency of data presentation between ETL runs for your users if you do not have to drop tables each ETL run. This example does not reflect that scenario.

A clear out and pull all data cycle is illustrated below.



1. SET SCHEMA to your existing data to be updated.

SET SCHEMA 'TESTING';2. DROP TABLE on the old stuff. This will also delete old indexes you had on the tables.

3. Compact the database on disk.
ALTER SYSTEM DEALLOCATE OLD;4. Get rid of your old foreign schema
DROP SCHEMA MYSQL_TESTING CASCADE;5. Get rid of your old foreign server connection definition
DROP SERVER jdbc_link_testing CASCADE;6. Recreate a foreign server connection definition


create server jdbc_link_testing

  foreign data wrapper sys_jdbc
  options(
     driver_class 'com.mysql.jdbc.Driver',
     url 'jdbc:mysql://172.27.0.204:3306/testing?useCursorFetch=true',
     user_name 'sg',
     password 'Complex38403BlahPass',   
     login_timeout '10',
     fetch_size '1000',
     validation_query 'select 1',
     schema_name 'testing',
     table_types 'TABLE');
7. Give LucidDB a schema where it can show the foreign tables

CREATE SCHEMA MYSQL_TESTING;
import foreign schema "testing" limit to ("FACT_ANSWERS","DIM_QUESTION","DIM_SUBMISSION_TYPE","FACT_VBP_CENSUS",
"FACT_SUBMISSION_RESULTS","DIM_PATIENT","DIM_HOSPITAL","DIM_DISEASE",
"DIM_READMISSION_REASON","DIM_DOCTOR")
from server jdbc_link_testing into MYSQL_TESTING;8. Switch active schema to the destination for your imported tables

SET SCHEMA 'TESTING';9. Perhaps use applib.create_table to help replicate the foreign tables from source to destination tables and schema

   CALL applib.create_table_as(null,'DIM_SUBMISSION_TYPE','select * from "MYSQL_TESTING"."DIM_SUBMISSION_TYPE"',true);
   CALL applib.create_table_as(null,'FACT_VBP_CENSUS','select * from "MYSQL_TESTING"."FACT_VBP_CENSUS"',true);
.....
10. Create indexes on all the columns involved in joining and filtering in all the tables.
11. Tell LucidDB to calculate statistics about indexes and all tables for the query planner.

....
ANALYZE TABLE DIM_QUESTION COMPUTE STATISTICS FOR ALL COLUMNS;
ANALYZE TABLE FACT_ANSWERS COMPUTE STATISTICS FOR ALL COLUMNS;
... more tables
12. Grant access to users for the new schema you created during the process if necessary

CALL APPLIB.GRANT_SELECT_FOR_SCHEMA( 'TESTING', 'pentaho_lucid' );


使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
12#
 楼主| 发表于 2012-9-29 20:42 | 只看该作者
0: jdbc:luciddb:http://localhost> create schema test;
No rows affected (0.078 seconds)
0: jdbc:luciddb:http://localhost> set schema 'test';
No rows affected (0.031 seconds)
0: jdbc:luciddb:http://localhost> create table a(a int);
No rows affected (0.203 seconds)

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表