16.00 - Creating a Foreign Server - Teradata Studio

Teradata Studio User Guide

prodname
Teradata Studio
vrm_release
16.00
created_date
March 2017
category
User Guide
featnum
B035-2041-126K

To define a foreign server, you must have the CREATE SERVER privilege on the database that stores the server objects. To associate a server with table operators, you must also have EXECUTE FUNCTION and SELECT privileges on the specified table operators.

  1. In the Navigator pane of the Administration perspective, right-click on Foreign Servers and select Show Foreign Servers from the pop-up menu. A list of foreign servers displays in the Object List Viewer.
  2. In the Object List Viewer toolbar, click (Create Foreign Server). The Foreign Server property form appears in the Details view.
  3. Click General.
    1. In Name, type the name of the foreign server object; for example, hcatalog_server.
    2. In Host Type, specify the type of the host; for example, hadoop.
    3. [Optional] In Comment, type the comments for the foreign server.
  4. [Optional] Click Security to specify the name and security type for the authorization that stores the credentials for the foreign server.
    1. [Optional] In Trusted Credential, select a security type from the list.
      • Definer — Indicates the authorization that describes the trusted remote user credentials is present in the database that contains the foreign server. You can specify either a Definer or an Invoker, but not both.
      • Invoker — Indicates the authorization that describes the trusted remote user credentials is present in the user database at the time the foreign server is accessed. You can assign only one INVOKER authorization name per database.
    2. In Authorization, type the name for the authorization.
  5. Click Name Value Pairs and identify the name value pairs that the table operators can use to connect to this foreign server. Name value pairs for host type are automatically generated as available using pairs. The pairs are global attributes of the server object. The host type name value pair is always displayed as the first in the name value pairs table; other pairs cannot be moved above it.
    Name value pairs for host type must be edited in the General tab.
    Button Description
    Add
    1. Click Add.
    2. Click in the Value Type column and select the type.
    3. If you selected Simple Value or Scalar SubQuery Value, enter the name in the Name column and the value or subquery in the Value column. If you selected System Variable Value, enter the Name, click in the Value column, and select a system variable.
    Remove Click Remove to remove the selected name value pair.
    Up Click Up to move the selected name value pair up in the list order
    Down Click Down to move the selected name value pair down in the list order
  6. [Optional] Click Import to associate an IMPORT table operator with this foreign server for importing data into Teradata Database. The name value pairs that you create for importing data are local attributes of the IMPORT table operator.
    1. In Database, select the name of the database that contains the import table operator.
    2. In Table Operator, select the name of the table operator to use.
    3. In Name Value Pairs, use the Add, Remove, Up, and Down buttons to create a list of name value pairs that this table operator uses to import data.
  7. [Optional] Click Export to associate an EXPORT table operator with this foreign server for exporting data out of Teradata Database. The name value pairs that you create for exporting data are local attributes of the EXPORT table operator.
    1. In Database, select the name of the database that contains the export table operator.
    2. In Table Operator, select the name of the table operator to use.
    3. In Name Value Pairs, use the Add, Remove, Up, and Down buttons to create a list of name value pairs that this table operator uses to export data.
  8. Click SQL to view the generated DDL that creates the foreign server.
  9. Click Commit to execute this statement.