Extracting data

Extracting allows you to copy some or all of the records or fields from an Analytics table to a new Analytics table.

The new table can be:

  • an identical copy containing all the source table records and fields
  • a subset of the records in the source table
  • a subset of the fields in the source table
  • a subset of both the records and the fields in the source table

The existing sort order in the source table is maintained in the new table.

Note

Extracting data and appending it to the end of an existing Analytics table is a data combining technique. It is explained in the section on combining data. For more information, see Extracting and appending data.

The usefulness of extracting data

The following are some of the reasons for extracting data to a new table:

  • produce a subset of only the data relevant to a particular analysis, and reduce file size and processing time
  • use filters to isolate particular items in a separate table for further analysis
  • preserve the integrity of an original data file by extracting its content to a working copy of the file
  • convert computed fields to physical fields populated with the actual computed values
  • extract data from a server table to a new, local table
  • extract data from two or more related tables to a new Analytics table

The difference between extracting data and copying a table

The difference between extracting all data, and copying a table in the Navigator (Edit > Copy), is that extracting creates a new source data file (.fil) as well as a new table layout, whereas copying creates only a new table layout that remains associated with the original source data file.

Extracting by record, by view, or by fields

When you extract data, you have the following options:

  • Record extract entire records
  • View extract all the fields in a view
  • Fields extract a selection of individual fields

When you extract entire records, the record is copied exactly, including any data stored in undefined gaps in the table layout.

When you extract all the fields in a view, or individual fields, any undefined portion of a record is ignored, even if you extract all the fields in the source table.

Extracting computed fields

Computed fields remain as computed fields when you extract by record. They are converted to physical fields of the appropriate data type, and populated with the actual computed values, when you extract by view or by fields.

Extracting time data in a computed field

If a computed field contains local times with a UTC offset (for example, 23:59:59-05:00), the local times and the UTC offset are preserved when you extract by record.

When you extract by view or by fields, the local times and the UTC offset are converted to UTC without an offset. For example, 23:59:59-05:00 becomes 04:59:59.

Additional details about extracting by view

Selecting the View option in the Extract dialog box allows you to extract exactly the data that is currently displayed in the active view.

The following details apply when extracting by view:

Which fields are extracted?

Only fields that are currently displayed in the view are extracted. Any additional fields that are part of the table layout but not displayed in the view are not extracted.

All fields in the view are extracted. If you want to extract a subset of fields, remove the unwanted fields from the view, create a new view with just the required fields, or use extract by fields instead of extract by view.

Field order The fields are extracted in the order they appear in the view. If you want to extract the fields in a different order, rearrange them in the view, or create a new view with the fields in the desired order, prior to extracting.
Filtering If a filter is currently applied to the view, only the data that meets the filter criteria is extracted.
Record notes Records notes are extracted only if the RecordNote column has previously been added to the view.
Alternate column titles If any alternate column titles are specified at the view level, extract by view preserves the view-level titles. If you use the syntax in the command log to rerun the extract command, alternate column titles specified in the table layout are used, and view-level titles are ignored.

Scripts

Command line

Specifying extract by view is not supported in scripts or from the command line. When rendered in ACLScript, extract by view is actually an extract by fields ( EXTRACT FIELDS ) using all the fields in the active view, in the order in which they appear in the view.

Extracting logical fields

Extracting logical fields requires that Include Filters in Field Lists is selected (Tools > Options > Interface).

Setting a control total

If you are extracting all the records in a table, or all the data in a view or a selection of fields, you can set a control total on a numeric field to verify that all the data is in fact extracted.

You set a control total for a field in the Table Layout dialog box. Once you have extracted the data, in the new table select Tools > Table History to compare the input and output control totals. For more information, see Define a physical field.

Extracting data from server tables and local tables

You can extract data from both server tables and local tables. Data extracted from a server table can be saved to a table on the server, or on your local computer. Data extracted from a local table can be saved only to a table on your local computer.

Steps

You can extract some or all of the records or fields from an Analytics table and output them to a new Analytics table.

Note

Extracting data and appending it to the end of an existing Analytics table is a data combining technique. It is explained in the section on combining data. For more information, see Extract and append data.

Analytics 14.1 Help