%% Create Cassandra Database Connection
% Using a local host address, create a Cassandra® database connection and display the keyspaces in the database.
%
% Create a Cassandra database connection using the local host address.

contactPoints = "localhost";
conn = cassandra(contactPoints)

% conn is a cassandra object that contains these properties:
% Cluster name
% Host address
% Local data center name
% Keyspaces
%
% Display the keyspaces in the Cassandra database by accessing the Keyspaces property of the cassandra object.

conn.Keyspaces

%
% Close the Cassandra database connection.

close(conn)

% Copyright 2018 The MathWorks, Inc.