Creating tables using CLI

You can create tables using the Presto CLI.

watsonx.data on IBM Software Hub

About this task

Complete the following steps to create table using the Presto CLI.

Procedure

  1. Log in to Presto CLI. For instructions to connect to Presto server from Presto CLI, see Connecting to a Presto server.
    bin/presto-cli.sh --catalog <catalog name>
  2. Run the following command to create a table:
    use <catalog name>.<schema name>;
    create table <table name>(column1 datatype1, ...);
    
    Note: If you do not have the schema, see Creating schema using CLI to create schema, and then create a table.