Oracle External Table Population小记
来源:互联网 发布:淘宝vintage首饰 编辑:程序博客网 时间:2024/04/20 08:25
从效率上,external table type=oracle_datapump>external table type=oracle_loader>oracle sqlldr direct.
另外external table population相对于data pump具有更强的ETL功能:Although Data Pump Export and Import canuse the newexternal tableaccess driver, they are not able tohandle all the complex extract, transform, load(ETL) cases. For example, you can manually create an external table that can be used to unload the result of a complexjoin between many source tables. The generated flat files can then be used to load and transform thecorresponding dataintothe target system by using SQL commandsdirectly.
今天试验了下External Table Population(Type=ORACLE_DATAPUMP),记录如下:
Step1---Createdirectory
sqlplus system/sys@testdb;
SQL>createdirectory extable as‘/data/extable’;(该目录已存在且可被当前操作系统用户读写)
SQL>grant read,write on extable to whf;
Step2---Unloading
sqlplus whf/whf@testdb;
CREATETABLE emp_ext
(first_name,last_name,department_name) --指定列名
ORGANIZATIONEXTERNAL --指定使用外部表
(
TYPE ORACLE_DATAPUMP --指定类型为ORACLE_DATAPUMP
DEFAULTDIRECTORY extable --指定路径
LOCATION(‘emp1.exp’,‘emp2.exp’,‘emp3.exp’) --指定生成的文件
)
PARALLEL 4 --并行度取location与parallel的最小值:如果Location文件数大于并行度则多余文件被忽略,如果location文件数小于并行度,则并行度自动降为文件数目.
AS
SELECTe.first_name,e.last_name,d.department_name
FROMemployees e, departments d
WHEREe.department_id =d.department_idAND
d.department_name in
('Marketing','Purchasing');
›Step3 --- Loading
SQL>create table target_table_nameasselect* fromext_tbl;
0 0
- Oracle External Table Population小记
- Oracle External Table (1)
- oracle外表(external table)
- oracle external table
- Oracle external table
- Oracle外部表 External Table
- Oracle external table & SQL*Loader
- Oracle外部表 External Table
- oracle 外部表 external table
- external table sample : from oracle document
- Oracle 之 外部表 external table
- oracle中创建外表(external table)
- 学习掌握oracle外表(external table)
- external table
- external table
- Oracle中的external table和 materialized view学习
- Oracle 外部表 External Table(一)[转+实践]
- Using Oracle Data Pump to create an external table
- 黑石:你不知道的苹果、谷歌与微软的共同股东
- 关于维护AC自动机fail树的三道题目
- 大白菜pe 通用pe 安装心得
- python发布中的几个细节
- 排序--归并算法思想及其代码实现
- Oracle External Table Population小记
- log4j2.x简单使用文档
- 编译hadoop-2.2.0源代码环境
- Hadoop2.2.0安装配置手册!完全分布式Hadoop集群搭建过程~(心血之作啊~~)
- 文字和图片同时提交 提示图片不完整
- Weblogic编译JSP生成Java文件的设置
- 将txt中的内容添加到数据库中
- 使python程序在Linux下一直运行
- Android 游戏开发之MediaPlayer、SoundPool以及AudioManager