• Apache Drill


    https://www.tutorialspoint.com/apache_drill/apache_drill_querying_parquet_files.htm

    Parquet is a columnar storage format. Apache Drill uses Parquet format for easy, fast and efficient access.

    Create a Table

    Before moving to create a table in parquet, you must change the Drill storage format using the following command.

    Query

    0: jdbc:drill:zk = local> alter session set `store.format`= 'parquet';

    Result

    +-------+------------------------+
    |  ok   |        summary         |
    +-------+------------------------+
    | true  | store.format updated.  |
    +———----+------------------------+
    

    You can create a table using the following syntax.

    Query

    0: jdbc:drill:zk = local> create table dfs.tmp.`/Users/../workspace` as select * from
       dfs.`/Users/../workspace/Drill-samples/student_list.json`;

    Result

    +----------+---------------------------+
    | Fragment | Number of records written |
    +----------+---------------------------+
    |   0_0    |            10             |
    +----------+---------------------------+
    

    To see the table contents, type-in the following query −

    Query

    0: jdbc:drill:zk = local> select * from dfs.tmp.`/Users/../workspace`;

    Result

    +-----+-------+-----+--------+----------+-------+-------+-------+-------------------+---------+
    | ID  | name  | age | gender | standard | mark1 | mark2 | mark3 |      addr         | pincode |
    +-----+-------+-----+--------+----------+-------+-------+-------+-------------------+---------+
    | 001 | Adam  | 12  |  male  |   six    |  70   |  50   |  60   | 23 new street     | 111222  |
    | 002 | Amit  | 12  |  male  |   six    |  40   |  50   |  40   | 12 old street     | 111222  |
    | 003 | Bob   | 12  |  male  |   six    |  60   |  80   |  70   | 10 cross street   | 111222  |
    | 004 | David | 12  |  male  |   six    |  50   |  70   |  70   | 15 express avenue | 111222  |
    | 005 | Esha  | 12  | female |   six    |  70   |  60   |  65   | 20 garden street  | 111222  |
    | 006 | Ganga | 12  | female |   six    |  100  |  95   |  98   | 25 north street   | 111222  |
    | 007 | Jack  | 13  |  male  |   six    |  55   |  45   |  45   | 2 park street     | 111222  |
    | 008 | Leena | 12  | female |   six    |  90   |  85   |  95   | 24 south street   | 111222  |
    | 009 | Mary  | 13  | female |   six    |  75   |  85   |  90   | 5 west street     | 111222  |
    | 010 | Peter | 13  | female |   six    |  80   |  85   |  88   | 16 park avenue    | 111222  |
    +-----+-------+-----+--------+----------+-------+-------+-------+-------------------+---------+
    
  • 相关阅读:
    我这里面所用的DBHelper
    同时向主表和从表里面导入execl数据 (asp.net webform)
    在asp.net webform中的 gridview 里面的一些基本操作
    在ASP.NET WEBFORM 中后台实现gridview全选功能
    asp.net webform 发送电子邮件
    Asp.Net中的三种分页方式
    asp.net获取客户端浏览器及主机信息
    在asp.net webfrom 中上传execl (读取单个sheet的数据)
    Linux五种IO模型性能分析
    epoll/poll/select的原理
  • 原文地址:https://www.cnblogs.com/panpanwelcome/p/13435137.html
Copyright © 2020-2023  润新知