Create table
Add records to the table
Scan entire table
Scan with Column Family
Scan with Column Family and Column Qualifier
Scan the entire table, limit number of records displayed to 10
Add a column family to an existing table
Delete a Column Family
Delete entire table
Deleting table is 2 step process first it has to be disabled and then dropped
create 'Test-Table', 'Test-Column-Family'
Add records to the table
put ’Test-Table’,’ROW_KEY’,’Test-Column-Family:Test-Column-Qualifier’,’Test-Value’
Scan entire table
scan 'Test-Table'
Scan with Column Family
scan 'Test-Table', {COLUMNS => 'Test-Column-Family'}
Scan with Column Family and Column Qualifier
scan 'Test-Table', {COLUMNS => 'Test-Column-Family:Test-Column-Qualifier'}
Scan the entire table, limit number of records displayed to 10
scan 'Test-Table', {COLUMNS => 'Test-Column-Family:Test-Column-Qualifier', LIMIT => 10}
Add a column family to an existing table
alter 'Test-Table', NAME => 'Test-Column-Family2'
Delete a Column Family
alter 'Test-Table', 'delete' => 'Test-Column-Family2'
Delete entire table
Deleting table is 2 step process first it has to be disabled and then dropped
disable 'Test-Table' drop 'Test-Table'
No comments:
Post a Comment