THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!

Apache Kylin : Analytical Data Warehouse for Big Data

Page tree

Welcome to Kylin Wiki.

Get Hive Table

GET /kylin/api/tables/{project}/{tableName}

Path Parameters

Variable name

NecessaryTypeDescription
projectyesstringProjectName to which table belongs
tableNameyesstringTable name to find

Response Sample

Sample
{
    "uuid": "e286e39e-40d7-44c2-8fa2-41b365522771",
    "last_modified": 1594810840000,
    "version": "3.9.9.1",
    "name": "KYLIN_SALES",
    "columns": [
        {
            "id": "1",
            "name": "TRANS_ID",
            "datatype": "bigint"
        },
        {
            "id": "2",
            "name": "PART_DT",
            "datatype": "date"
        },
        {
            "id": "3",
            "name": "LSTG_FORMAT_NAME",
            "datatype": "varchar(256)"
        },
        {
            "id": "4",
            "name": "LEAF_CATEG_ID",
            "datatype": "bigint"
        },
        {
            "id": "5",
            "name": "LSTG_SITE_ID",
            "datatype": "integer"
        },
        {
            "id": "6",
            "name": "SLR_SEGMENT_CD",
            "datatype": "smallint"
        },
        {
            "id": "7",
            "name": "PRICE",
            "datatype": "decimal(19,4)"
        },
        {
            "id": "8",
            "name": "ITEM_COUNT",
            "datatype": "bigint"
        },
        {
            "id": "9",
            "name": "SELLER_ID",
            "datatype": "bigint"
        },
        {
            "id": "10",
            "name": "BUYER_ID",
            "datatype": "bigint"
        },
        {
            "id": "11",
            "name": "OPS_USER_ID",
            "datatype": "varchar(256)"
        },
        {
            "id": "12",
            "name": "OPS_REGION",
            "datatype": "varchar(256)"
        }
    ],
    "source_type": 0,
    "table_type": "MANAGED_TABLE",
    "database": "DEFAULT"
}

Get Hive Tables

GET /kylin/api/tables

Request Parameters

Variable name

NecessaryTypeDescription
projectyesstringWill list all tables in the project.
extnobooleanSet true to get extend info of table.

Response Sample

Sample
[
    {
        "uuid": "e286e39e-40d7-44c2-8fa2-41b365522771",
        "last_modified": 1594810840000,
        "version": "3.9.9.1",
        "name": "KYLIN_SALES",
        "columns": [
            {
                "id": "1",
                "name": "TRANS_ID",
                "datatype": "bigint"
            },
            {
                "id": "2",
                "name": "PART_DT",
                "datatype": "date"
            },
            {
                "id": "3",
                "name": "LSTG_FORMAT_NAME",
                "datatype": "varchar(256)"
            },
            {
                "id": "4",
                "name": "LEAF_CATEG_ID",
                "datatype": "bigint"
            },
            {
                "id": "5",
                "name": "LSTG_SITE_ID",
                "datatype": "integer"
            },
            {
                "id": "6",
                "name": "SLR_SEGMENT_CD",
                "datatype": "smallint"
            },
            {
                "id": "7",
                "name": "PRICE",
                "datatype": "decimal(19,4)"
            },
            {
                "id": "8",
                "name": "ITEM_COUNT",
                "datatype": "bigint"
            },
            {
                "id": "9",
                "name": "SELLER_ID",
                "datatype": "bigint"
            },
            {
                "id": "10",
                "name": "BUYER_ID",
                "datatype": "bigint"
            },
            {
                "id": "11",
                "name": "OPS_USER_ID",
                "datatype": "varchar(256)"
            },
            {
                "id": "12",
                "name": "OPS_REGION",
                "datatype": "varchar(256)"
            }
        ],
        "source_type": 0,
        "table_type": "MANAGED_TABLE",
        "database": "DEFAULT"
    }
]

Load Hive Tables

POST /kylin/api/tables/{tables}/{project}

Request Parameters

Variable name

NecessaryTypeDescription
tablesyesstringTable names you want to load from hive, separated with comma
projectyesstringThe project which the tables will be loaded into

Request Body

Variable name

NecessaryTypeDescription
calculatenobooleanSet true to calculate cardinality

Response Sample

Sample
{
    "result.loaded": [
        "DEFAULT.KYLIN_SALES"
    ],
    "result.unloaded": []
}

Unload Hive Tables

DELETE /kylin/api/tables/{tables}/{project}

Path Parameters

Variable name

NecessaryTypeDescription
tablesyesstringTable names you want to unload, separated with comma
projectyesstringThe project which the tables belong to

Response Sample

Sample
{
    "result.unload.success": [
        "kylin_sales"
    ],
    "result.unload.fail": []
}

Show databases in hive

GET /kylin/api/tables/hive

Response Sample

Sample
[
    "apache",
    "kylin",
    "default"
]

Show tables in a hive database

GET /kylin/api/tables/hive/{database}

Response Sample

Sample
[
    "kylin_country",
    "kylin_cal_dt",
    "kylin_sales",
    "kylin_account"
]



























  • No labels