关于动态分区表插入而不在hive中创建staging / temp表

时间:2017-06-22 12:32:40

标签: hadoop hive bigdata

在将数据加载到动态分区表时,我知道首先要创建     临时/临时表然后在此临时表中加载数据,然后覆盖     进入分区表,但在一次采访中我被问到如何直接加载     没有临时/临时表。请指导插入的其他方法。

1 个答案:

答案 0 :(得分:0)

要不使用temp / staging表直接将数据加载到表中,我们可以使用以下命令

export class comnentClass implements OnInit {


  addAccountForm = new FormGroup({
      "username": new FormControl('',
    [ Validators.required],this.shouldContainUniqueUsername.bind(this)), 
    "password": new FormControl('', Validators.required),
    "confirmPassword": new FormControl('',[Validators.required,this.checkPasswords.bind(this)]),
  });

  get username() {
    return this.addAccountForm.get('username');
  }

  get password() {
    return this.addAccountForm.get('password');
  }

  get confirmPassword() {
    return this.addAccountForm.get('confirmPassword');
  }

  onSubmit() {
  }

checkPasswords(control: AbstractControl) { 

let pass = this.password;
  console.log("password is "+pass)
  return pass === control.value ? null : { notSame: true }     
}

}

You can refer to the link