Oracle内存模型:SGA与PGA详解

🌌 365娱乐是什么 ⏳ 2025-08-13 01:23:28 👤 admin 👁️ 6432 💖 538
Oracle内存模型:SGA与PGA详解

GawynKing:

-- hive -f 方式1

create table if not exists tmp_db.tmp_caesar(

id int,

name string,

start_date string,

end_date string,

etl_time string

);

set hivevar:start_date = '${hivevar:etl_date}';

set hivevar:end_date = date_add('${hivevar:etl_date}',1);

insert overwrite table tmp_db.tmp_caesar

select

floor(rand()*1000) as id,

concat('caesar_',cast(floor(rand()*1000) as string)) as name,

${start_date} as start_date, -- 使用hivevar语法并添加单引号

${end_date} as end_date,

current_timestamp() as etl_time

from tmp_db.youchu_core

limit 10

;

-- hive -f 方式2

create table if not exists tmp_db.tmp_caesar(

id int,

name string,

start_date string,

end_date string,

etl_time string

);

set hivevar:start_date = '${etl_date}';

set hivevar:end_date = date_add('${etl_date}',1);

insert overwrite table tmp_db.tmp_caesar

select

floor(rand()*1000) as id,

concat('caesar_',cast(floor(rand()*1000) as string)) as

相关文章