创建以管道分隔的配置单元表 - 重复的ID

时间:2018-03-12 00:11:11

标签: hive

我正在尝试使用以下命令创建一个以管道分隔的配置单元表:

select count(distinct id) as cnt from tableA ;

我在新表tableA中获得了重复记录。我检查了

Create table if not exists tableA as 
select a.id
           b.col1,
           b.col2,
           b.col3,
           b.col4,
           b.col5,
           b.col6,
           b.col7
    FROM   customerTable as a  left join factTable as b  on a.id   = b.id; 

然而,如果我像这样创建一个普通的hive表,我不会得到任何重复的id:

var t = 0;
var curve = new THREE.EllipseCurve( .37,  .15, .35, .25, 150,  450, false, 0 );
var points = curve.getPoints( 50 );
var curveGeometry = new THREE.BufferGeometry().setFromPoints( points );
var particleGeometry = new THREE.Geometry();
var particleMap = new THREE.TextureLoader().load( "/img/spark.png" );
var vertex = new THREE.Vector3();
vertex.x = points[0].x;
vertex.y = points[0].y;
vertex.z = 0;

particleGeometry.vertices.push(vertex); 

particleMaterial = new THREE.PointsMaterial({
    size: .05,
    map: particleMap,
    blending: THREE.AdditiveBlending,
    depthTest: false,
    transparent : true
});

particles = new THREE.Points( particleGeometry, particleMaterial );
scene.add(particles);
animate();

function animate() {
    if (t <= 1) {
        particles.position = curveGeometry.getPointAt(t)
        t += 0.005
    } else {
        t = 0;
    }

    requestAnimationFrame( animate );
    render();
}

function render() {
    renderer.render( scene, camera );
}

创建的表格大小为80万行,但记录数量(重复记录)的差异仅为58条记录。

不知道最近发生了什么。我想问题是我如何创建管道分隔的蜂巢表。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

在create table语句中删除tblproperties (&#34; skip.header.line.count&#34; =&#34; 1&#34;); 属性并再次运行insert语句。