Uploading a Script

You can find and download sample scripts from the Overview help options. Only SQL scripts support visualizations; BTEQ scripts do not support visualizations.

  1. Click , then click Develop.
  2. Click Upload a script.
  3. Under Script Info, do the following to describe your script:
    1. Select a Script Type.
      Once you save Script Info, you cannot change Script Type.
    2. Enter a Name, and select Icon and Color.
    3. [Optional] Enter a Description.
    4. [Optional] Click Advanced and accept the default Memory and Processors values.
      Teradata recommends that you change the Memory and Processors values only if you encounter errors that indicate limited resources.
  4. [Optional] Enter a tag name for filtering.
    You can enter multiple tag names. Tags are used to filter apps and scripts in the Browse pane.
  5. Click Save.
  6. Under Script File, select one of the following.
    Option Action
    Sync scripts from a GitHub repo
    1. Enter the GitHub repo and branch.
    2. If this is a private rep, enter credentials.
    3. Click Sync Repo.

      AppCenter selects the first script file that passes the successful match test.

    4. [Optional] If you want to select another file in the repo, click , select the file, then click Sync Repo.
    Upload a file with your code
    1. Click BROWSE, select the file, then click Save.

      In the code file, you can add parameters for a SQL Query to make it more generic and shareable. A parameter can be defined as “${schema}” where schema is the parameter that accepts different values. For example: SELECT * FROM “${schema}”

  7. [Optional] Under Script User Options, do one of the following to add required and optional settings:
    Option Action
    Parameters in a SQL Query
    1. Click Add Field, then click .
    2. Type input for Name, then select Text for Type.
    3. [Optional] Enter a Default value to appear if the user does not specify a default.
    4. [Optional] Click to select Required. If this field is not part of the job execution parameters, the job will fail.
    5. Click Save & Continue.
    Other
    1. Click Add Field, then click .
    2. Enter a Name, select a Type, then complete required entries. If you select Upload as the Type, AppCenter prompts you to upload the parameters file when you execute the job.
    3. Click Save & Continue.
  8. [Optional] For SQL scripts only, under Visualizations, do the following to set visualization options:
    1. Click .
    2. Select a Type and Format, then complete entries.
      Note
      If you select Custom (Upload), follow the instructions on the screen for installing and running Node.js and Polymer Bundler to upload the resulting bundled file with the visualization.
    3. Click Save & Continue.
      If you added visualization parameters, AppCenter generates visualizations based on the number of queries in the script file you uploaded.
  9. [Optional] Under Permissions, do the following to control who can view and manage the script:
    1. To add a manager, enter the user name, and press Enter.
    2. To make the script public, turn privacy off.
    3. To add a user, enter the user name, and press Enter for each user you want to add.
    4. To add a group, enter the group name, and press Enter for each group you want to add.
    5. Click Save & Continue.
  10. [Optional] Click SCRIPT OVERVIEW to view script code details, history, logs, and more.
  11. [Optional] Click RUN SCRIPT to run a job for this script.
    If the SQL file includes a SELECT statement and no query tag, AppCenter generates a table visualization. For example, AppCenter will generate three visualizations based on the following SQL file:
    --name=query1
    SELECT * FROM cfilter_demo LIMIT 100;
    --name=query2

results matching ""

    No results matching ""