public void createTable ( ) { // [START bigtable_create_table] // Checks if table exists, creates table if does not exist. if ( ! adminClient . exists ( tableId ) ) { System . out . println ( "Table does not exist, creating table: " + tableId ) ; CreateTableRequest createTableRequest = CreateTableRequest . of ( tableId ) . addFamily ( "cf" ) ; Table table = adminClient . createTable ( createTableRequest ) ; System . out . printf ( "Table: %s created successfully%n" , table . getId ( ) ) ; } // [END bigtable_create_table] }
Demonstrates how to create a table with the specified configuration .