| 1. |
How Tables Are Managed In Apache Tajo? |
|
Answer» The logical view of the data source is defined as table. The table consists of various properties like logical schema, partitions, URL etc. A Tajo table can be a directory in HDFS, a single file, one HBase table, or a RDBMS table. The TYPES of tables SUPPORTED by Apache Tajo are: External table: External table NEEDS the location property when the table is created. For instance, if the data is ALREADY there as Text/JSON files or HBase table, it can be registered as Tajo external table. The following query is an example of external table creation. create external table sample(col1 int,col2 text,col3 int) location ‘hdfs://path/to/table'; Internal table: A Internal table is also called an Managed Table. It is created in a pre-defined physical location called the TABLESPACE. create table table1(col1 int,col2 text); By default, Tajo uses “tajo.warehouse.directory” located in “conf/tajo-site.xml” . Tablespace configuration is used to assign new location for the table. The logical view of the data source is defined as table. The table consists of various properties like logical schema, partitions, URL etc. A Tajo table can be a directory in HDFS, a single file, one HBase table, or a RDBMS table. The types of tables supported by Apache Tajo are: External table: External table needs the location property when the table is created. For instance, if the data is already there as Text/JSON files or HBase table, it can be registered as Tajo external table. The following query is an example of external table creation. create external table sample(col1 int,col2 text,col3 int) location ‘hdfs://path/to/table'; Internal table: A Internal table is also called an Managed Table. It is created in a pre-defined physical location called the Tablespace. create table table1(col1 int,col2 text); By default, Tajo uses “tajo.warehouse.directory” located in “conf/tajo-site.xml” . Tablespace configuration is used to assign new location for the table. |
|