Appending In-Memory Tables

How Does Appending In-Memory Tables Work?

The data builder provides a very convenient way to add incremental data into a single table. For example, if sales data is loaded into memory on a daily schedule, you can append the numerous daily tables into a separate table that contains the cumulative sales data.
For the purpose of comparison, you can create a data query to append to an in-memory table with a data query. One reason to append entire tables is that you can also access the tables individually.

Append In-Memory Tables

To append in-memory tables:
  1. Select LASRthen selectAppend Tables.
  2. Select the table that you want to append data to from the Available tables list, and click Move to base table to move it to the Base table field.
    If the table that you want to use is not listed, click Choose source table library to view a different source library. If a table is added to the library after you click Choose source table library, then the list does not automatically refresh to show the new table. Select the same library again to refresh its contents.
  3. Add tables to the Source tables list. These are the tables that have the rows to append to the base table.
  4. (Optional) If you select the Unload source tables after appending them to the base table check box, then the source tables are dropped from memory after the append completes.
    Select this option only if you do not want to access the source tables individually.
  5. Click the Save button, and specify a name and location.
  6. Click the Run button to append the source tables.
Note: If an administrator reloads the base table, any data that you previously appended to the table will not be saved. The base table will go back to its original content and size.
Note: If the append fails and you get an error message that says that the file is read-only, in some cases it could mean that your administrator has indicated the fullcopyto= option for the table. You cannot append to a table that includes this option. Contact your administrator for more information.

How Are Tables Used?

Base and Source Tables

The following list identifies the considerations for source tables:
  • The source tables and base table must be in-memory and in the same library.
  • The source tables can be LASR star schema views. However, the base table cannot be a view.
  • If you append tables with character columns of different lengths, then the length of the column in the base table takes precedence. For example, if you have a column in the base table that is 15 characters and a column in the source table is 20 characters, the data from the source table’s column is truncated to 15 characters.
  • If the base table is partitioned, then the source tables must be partitioned on the same variables.
  • If the base table has a column that is not present in a source table, then the rows in the source table receive a missing value for the column that is not present in the source table.
  • If a source table has columns that are not present in the base table, then the columns are dropped and are not appended to the base table. The base table always maintains the same number of columns.
  • The order of the columns in a source table does not need to match the order of the columns in the base table.
  • The data builder does not prevent you from appending the same source table more than once. Review the source table list to ensure you did not accidentally use a source table more than once.

Conserving Memory

After you append the source tables, the base table grows to accommodate the additional rows. This consumes memory on the SAS LASR Analytic Server.
If you do not need to access the source tables after appending them, then you can select the Unload source tables after appending them to the base table check box. This option conserves memory, but you must ensure that the source tables are loaded to memory again (often with newer data) before you can run the append again.
Last updated: January 8, 2019