Creating a table

This section assumes that you have created one or multiple datasets. Also, this section assumes that you are viewing the worksheet where you want to create the table. See Understanding workbooks and worksheets for information about how to switch between worksheets.

You can create as many tables as you want from one dataset.

NOTE: Tables can be created as a result of table operations. For example, joining two tables results in a new table. Running a batch dataflow, which is an advanced feature, can also create a table. This section is about creating a table by selecting fields in the data source.

Displaying the Dataset Preview window

The Dataset Preview window is displayed automatically after you import data from a data source. Alternatively, follow these steps to display the Dataset Preview window:

  1. Click (Datasets icon).
  2. In the Datasets panel, right click a dataset icon and then select Preview in the pop-up menu, as shown in the following screenshot:

Create a table from the columns in the Dataset Preview window

In the Dataset Preview window, follow these steps to create a table:

  1. Follow one of these steps:

    • Click one or multiple column headings to select the columns that form the table. Clicking a selected column heading deselects the column.
    • Click Select All if you want all columns to be in the table.
    • Create a table without any columns. You can select fields from the dataset and add them to the table after the table is created.
    NOTE: Under certain circumstances, not all the columns are included automatically in the Dataset Preview. For example, if a dataset contains 62 rows and the last 2 rows have a column that the first 60 rows do not have, this column is not included in the table in this step. You can, however, add this column later. For information about adding columns, see Adding columns from a dataset to a table.
  2. In the Create New Table panel, select the worksheet to which the selected columns will be sent.

  3. (Optional) In the Create New Table panel, edit the table name. A default table name, based on the dataset name, is provided. You can rename the table at a later time. For information about changing a table name, see Renaming a table.

  4. (Optional) Display the advanced options, as shown in the following screenshot, to enter the column prefix. If you do not specify a prefix, Xcalar Design provides a name that is based on the dataset name. (The dataset name is derived from the data source name.)

    A column prefix is used to distinguish columns with the same name in the same table. Typically, column name conflicts occur due to a Join operation. If the left and right tables have the same name for a column, the prefixes (if different) help you identify the origin of each column in the resultant table.

    NOTE: If the prefixes of the tables being joined happen to be the same, you are prompted to change the prefix before starting the Join operation.

    You can specify a prefix at table creation time or when preparing for a Join operation. You cannot change the prefix at other times.

    Column prefixes are displayed in column headers with a user-selectable background color. For a prefix example, see Worksheet window with tables.

  5. If you want to remove columns from the Create New Table panel, click the Delete icon to remove a column, or click REMOVE ALL COLUMNS to remove all columns listed in the panel.
  6. Click CREATE TABLE. All columns shown in the Create New Table panel are sent to the same worksheet.

The following sample screen shows the Dataset Preview window and the Create New Table panel.

Renaming a table

After you create a table in the worksheet, you can follow these steps to rename a table:

  1. In the worksheet, double click the table name. The following screenshot shows where to enter the new table name.

  2. Type the new name.
  3. Press Enter.

Next step

For more information about the worksheet window after you create a table, see Worksheet window with tables. You are now ready for transforming your data by using the various functions in Xcalar Design.

Go to top