1Z0-032-19: Loading data into a database

1Z0-032-19: Loading data into a database:

用sql*loader进行数据移植。sql的移植工具可以作为oracle的补充。
data loading methods: export/import 用于在oracle DB之间进行参看18章。
direct-load insert: 同一个DB内的表之间进行移植。
sql*loader : 与其他文本之间进行移植。
direct-load insert: 可以并行,也可以串行。对分区表与非分区表都可以。可以产生日志,也可不产生日志。
直接插入到high-water mark以上,所以会产生空间浪费。
insert /*+append */ into emp nologging select * from t_employees ; commit;//串行。
nologging是为了不产生日志 ,在成批数据插入时是有很强的优势。
alter session enable parallel DML;
insert /*+parallel(table1,2) */ into table1 select * from employees;
SQL*Loader: 比较复杂程序;用于不同系统间移植数据。
字段处理---->记录选择-----
当数据量小时,可以写入到controlfile; parameter file 是可选的,但有一定用途。
两种方式:direct path: 不对数据进行cache, 不对数据进行过滤。 data saves; 不一定产生日志;只保持PK,unique,not null,no trigger;no clustered table;不可以进行数据操作,在进行时;
conventional: 同样数据放在high-water之上。需要commit;产生日志;保持所有约束;trigger; clustered table; 可以同时进行数据操作。
control file 是必要的文件:
数据格式(固定长度,可变长,数据流格式);配置方式(memory,);对数据处理;
语法自由;大小写不敏感;用--进行注释。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2023-06-06 18:10:33,041 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 2023-06-06 18:10:33,075 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 2023-06-06 18:10:33,218 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. 2023-06-06 18:10:33,218 INFO tool.CodeGenTool: Beginning code generation Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 2023-06-06 18:10:33,782 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user_log` AS t LIMIT 1 2023-06-06 18:10:33,825 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user_log` AS t LIMIT 1 2023-06-06 18:10:33,834 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/module/hadoop-3.1.4 注: /tmp/sqoop-root/compile/5f4cfb16d119de74d33f1a0d776d5ae0/user_log.java使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 2023-06-06 18:10:35,111 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/5f4cfb16d119de74d33f1a0d776d5ae0/user_log.jar 2023-06-06 18:10:35,125 WARN manager.MySQLManager: It looks like you are importing from mysql. 2023-06-06 18:10:35,126 WARN manager.MySQLManager: This transfer can be faster! Use the --direct 2023-06-06 18:10:35,126 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path. 2023-06-06 18:10:35,126 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql) 2023-06-06 18:10:35,130 ERROR tool.ImportTool: Import failed: No primary key could be found for table user_log. Please specify one with --split-by or perform a sequential import with '-m 1'.
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值