Creating and Using External Web Tables

    creates a web table definition. You can define command-based or URL-based external web tables. The definition forms are distinct: you cannot mix command-based and URL-based definitions.

    Parent topic: Defining External Tables

    By default, the command is run on segment hosts when active segments have output rows to process. For example, if each segment host runs four primary segment instances that have output rows to process, the command runs four times per segment host. You can optionally limit the number of segment instances that execute the web table command. All segments included in the web table definition in the ON clause run the command in parallel.

    The command that you specify in the external table definition executes from the database and cannot access environment variables from .bashrc or .profile. Set environment variables in the clause. For example:

    The following command defines a web table that runs a script. The script runs on each segment host where a segment has output rows to process.

    URL-based External Web Tables

    A URL-based web table accesses data from a web server using the HTTP protocol. Web table data is dynamic; the data is not rescannable.

    The following sample command defines a web table that gets data from several URLs.