On this page

    Views

    The SQL commands for views enable you to create, replace, and drop views in the Nessie repository.

    Creating or Replacing a View

    Syntax
    CREATE [ OR REPLACE ] VIEW <view_path> AS 
      <select_statement>
    

    Parameters

    <view_path>

    String

    The path of the view that you want to create. The name of the view should be unique. The view can be in your home space or a regular space.


    <select_statement>

    String

    The query used to populate the view.

    Examples

    Create a view
    CREATE VIEW demo.example_view AS 
      SELECT * 
      FROM "oracle_tpch".DREMIO.JOBS
    
    Replace a view
    CREATE OR REPLACE VIEW demo.example_view AS 
      SELECT * 
      FROM "oracle_tpch".DREMIO.INVENTORY
    

    Dropping a View

    Syntax
    DROP VIEW <view_path>
    

    Parameters

    <view_path>

    String

    The path of the view that you want to drop. The view can be in your home space or a regular space.

    Examples

    Drop a view
    DROP VIEW demo.example_view