Bootstrap Data

Create HBase Datasets

Catalog Provider Command
USER

  gsql("""set pcatalog.flights_lookup_cancellation_code_hbase.dataSetProperties=
  {
      "datasetType": "HBASE",
      "fields": [
          {
              "fieldName": "Code",
              "fieldType": "string",
              "isFieldNullable": false
          },
          {
              "fieldName": "Description",
              "fieldType": "string",
              "isFieldNullable": false
          }
      ],
      "partitionFields": [],
      "props": {
          "gimel.hbase.rowkey":"Code",
          "gimel.hbase.table.name":"flights:flights_lookup_cancellation_code",
          "gimel.hbase.namespace.name":"flights",
          "gimel.hbase.columns.mapping":":key,flights:Description",
           "datasetName":"pcatalog.flights_lookup_cancellation_code_hbase"
      }
  }
  """)

HIVE

  drop table if exists pcatalog.flights_lookup_cancellation_code_hbase;      
  CREATE EXTERNAL TABLE `pcatalog.flights_lookup_cancellation_code_hbase`(
    `Code` string,
    `Description` string
  )
  ROW FORMAT SERDE
    'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
  STORED AS INPUTFORMAT
    'org.apache.hadoop.mapred.TextInputFormat'
  OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
  TBLPROPERTIES (
    "gimel.hbase.rowkey"="Code",
    "gimel.hbase.table.name"="flights:flights_lookup_cancellation_code",
    "gimel.hbase.namespace.name"="flights",
    "gimel.hbase.columns.mapping"=":key,flights:Description",
    'gimel.storage.type'='HBASE');


Catalog Provider Command
USER

  gsql("""set pcatalog.flights_lookup_carrier_code_hbase.dataSetProperties=
  {
      "datasetType": "HBASE",
      "fields": [
          {
              "fieldName": "Code",
              "fieldType": "string",
              "isFieldNullable": false
          },
          {
              "fieldName": "Description",
              "fieldType": "string",
              "isFieldNullable": false
          }
      ],
      "partitionFields": [],
      "props": {
          "gimel.hbase.rowkey":"Code",
          "gimel.hbase.table.name":"flights:flights_lookup_carrier_code",
          "gimel.hbase.namespace.name":"flights",
          "gimel.hbase.columns.mapping":":key,flights:Description",
           "datasetName":"pcatalog.flights_lookup_carrier_code_hbase"
      }
  }
  """)

HIVE

  drop table if exists pcatalog.flights_lookup_carrier_code_hbase;
  CREATE EXTERNAL TABLE `pcatalog.flights_lookup_carrier_code_hbase`(
    `code` string,
    `description` string
  )
  ROW FORMAT SERDE
    'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
  STORED AS INPUTFORMAT
    'org.apache.hadoop.mapred.TextInputFormat'
  OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
  TBLPROPERTIES (
    "gimel.hbase.rowkey"="Code",
    "gimel.hbase.table.name"="flights:lights_lookup_carrier_code",
    "gimel.hbase.namespace.name"="flights",
    "gimel.hbase.columns.mapping"=":key,flights:Description",
    'gimel.storage.type'='HBASE');


Catalog Provider Command
USER

  gsql("""set pcatalog.flights_lookup_airline_id_hbase.dataSetProperties=
  {
      "datasetType": "HBASE",
      "fields": [
          {
              "fieldName": "Code",
              "fieldType": "string",
              "isFieldNullable": false
          },
          {
              "fieldName": "Description",
              "fieldType": "string",
              "isFieldNullable": false
          }
      ],
      "partitionFields": [],
      "props": {
          "gimel.hbase.rowkey":"Code",
          "gimel.hbase.table.name":"flights:flights_lookup_airline_id",
          "gimel.hbase.namespace.name":"flights",
          "gimel.hbase.columns.mapping":":key,flights:Description",
           "datasetName":"pcatalog.flights_lookup_airline_id_hbase"
      }
  }
  """)

HIVE

  drop table if exists pcatalog.flights_lookup_airline_id_hbase;
  CREATE EXTERNAL TABLE `pcatalog.flights_lookup_airline_id_hbase`(
    `code` string,
    `description` string
  )
  ROW FORMAT SERDE
    'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
  STORED AS INPUTFORMAT
    'org.apache.hadoop.mapred.TextInputFormat'
  OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
  TBLPROPERTIES (
    "gimel.hbase.rowkey"="Code",
    "gimel.hbase.table.name"="flights:flights_lookup_airline_id",
    "gimel.hbase.namespace.name"="flights",
    "gimel.hbase.columns.mapping"=":key,flights:Description",
    'gimel.storage.type'='HBASE');