Reputation: 4557
Can i specify the HBase column names upfront - in the CREATE statement?
If yes, how?
I only understood that i can specify the column families upfront and add columns later.
UPDATE
Please read a good explanation on this topic here Deleting Columns in HBase
Upvotes: 1
Views: 1337
Reputation: 196
The column you are referring is called "column-qualifier" [ just to make the things clear ]
No. We cannot provide column-qualifier during table creation. This is what makes HBase schema-less. The syntax for creating tables in HBase is as follows.
create ‘<table name>’,’<column family>’
Once you have created the table, you can add rows which should belong to at-least one column-family in a table and then can belong to any column-qualifier.
If the column-qualifier is not already present, it will be created.
Upvotes: 2