Using the Source View

Home   Back   Next  

Accessing and Saving Data > Viewing Data Sets > Using the Source View

 

When opening text files, whether delimited of fixed-length, Strata provides a special Source View that enables you to change the text parameters.  If, for instance, a comma-delimited file was incorrectly interpreted as a fixed-length file, you can manually change this parameter so your data displays correctly in the Table View.  Similarly, if your field headers are displayed as the first record, you can easily change this so that they display properly as the headers.

 

The Source view provides different controls for both text types -- text-delimited and fixed-length, as discussed below.  To open the Souce View for a file, select "Source" from the View menu or toggle the View icon found in the upper-right hand corner of the software.

 

 

Working with Text-Delimited Files

 

If you table is a text-delimited file, the source view will show the following page and controls:

 

sourceview_delimiter

 

In this example, we have a comma-separated text file that, in is raw form, would look like this:

 

"Field1","Field2","Field3"

"Test1","T","F"

"Test2","F","F"

 

You can use the source view to change the parameters of your table as follows:

 

File Type: This drop-down menu lets you select whether the text file is text-delimited or fixed-length.  Select the proper text type, and the page will update according to the data in your file.
Field Delimiters: This drop-down menu lets you select your delimiter.  In the example above, the file is a comma-separated text file, so the delimiter is a comma (,).  However, you can change the delimiter depending on your file type.  For delimiters that are not listed, select "Other" and then type in the delimiter into the box.
Text Qualifier: A text qualifier is often used in text files to help denote what is and isn't text.  In this example, each field contains quotation marks (") around the word.
First Row Checkbox: If the first row of text in your file contain header names, check this box.

 

As you change these parameters, the source view will update to show how the data will display in your table.

 

 

Working with Fixed-length Text Files

 

If your table is a fixed-length file, the source view will show the following page and controls:

 

sourceview_fixed

 

In this example, we have a fixed-length text file that, in is raw form, would look like this:

 

Field1  Field2  Field3

A       B       1

C       D       2

E       F       3

 

You can use the source view to change the parameters of your table as follows:

 

File Type: This drop-down menu lets you select whether the text file is text-delimited or fixed-length.  Select the proper text type, and the page will update according to the data in your file.
Skip Beginning Character: If you have meta data at the beginning of your file, you may skip this by entering the number of characters to skip.
Row Width: This area displays the length of the entire file.
Rows end with CR/LF: Check this box if your text-file ends with a Carriage Return or Line Feed in order to parse the table correctly.

 

Once you have set the parameters of your file, you may select the fields:

 

To add fields, move your cursor over the data and single-click the area where you want a field.  A line will be added to the area to create a new field.
To move fields, click on an existing field line and move it to the left or right.
To delete fields, double click on an existing field line and it will disappear.

 

Once you are finished you can view your table by toggling to the Table View or edit the structure in the Design View.

 

NOTE:  Because there are no delimiters to determine field names, you'll need to add the field names manually.  You can do this by double-clicking on the field header and editing the name.  In the above example, you would first set your fields, then rename the field names, and finally change the "Skip Beginning Characters" to 22, in order to skip the field names in your data.