Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correcting the python doc page links

Synapse Tables are Synapse tables are used to organize web-accessible, sharable, and queryable data. Tables may be queried and edited with the Synapse web clientUI, as well as with the Synapse programmatic clients. This article guides you through the process of creating a Tabletable in Synapse.

(plus) For information about searching how to query a Tabletable, see Search Querying Tables and Views.

You can define Table columns to contain common data types like text, numbers, and dates, or you can define columns to include references to other Synapse objects, like Files and Folders.

, Views, and Datasets.

(plus) To learn more about creating Tables tables and creating queries using one of the Synapse programmatic clients, see:

What is a schema?

A schema is the structure of your dataset. In a Table, a schema defines the structure by specifying the column names, types, and sizes. A schema may also define the values allowed in each column.

...

Creating a New Table

...

From a File

Tables require structured data contained in a .csv or .tsv file. If your structured data is saved in an Excel format such as .xls or .xlsx, you must “save-as” to convert the file to a .csv before you proceed in Synapse. Navigate to the Tables tab in your Project project and select Upload a Table. If you provide a .csv or .tsv file, Synapse will infer your Table table schema based on the column headers. You may further customize the schema by selecting Schema Options.

For very large files, it may take time for the Table table to be built and indexed completely before it can be viewed. You may navigate away from the Table table once you have clicked Create, and you will not lose any data.

...

Creating an Empty Table

You have the option to create an empty table by clicking on the Tables Tools menu and Add Table. To build a new Tabletable, you must specify the Table table structure, column by column. Select Add Column to set the Column Name, Column Type, Size, Default Value, and Restrict Values. If you have created an empty Table, you will need to click on specify each column’s properties.

Column Name

Choose a name for the column that will appear in the header. Column names must be 256 characters or less. There are three reserved words that cannot be used for Column Name: ROW_ID, ROW_VERSION, ROW_ETAG (case insensitive).

Column Type

Select the type of data that will be entered into this column. For detailed descriptions of each column type, see the REST docs.

Size

For certain column types, such as String or Link, you must specify the maximum size of a single value. The default value is 50 characters, but you can limit the maximum size to be between 1 and 1000 characters. For column types that are lists (such as StringList or IntegerList), this number specifies the character maximum for all values in the column.

Max List Length

For some list column types (such as StringList or IntegerList), you must specify a maximum list length. This number describes the maximum number of values that can appear in your list. For example, a Max List Length of 3 means that you may enter a list of up to three items.

Default Value (optional)

Choose a default value to pre-populate in every new row of the column. Leave this field blank if you do not want to specify a default.

Restrict Values (optional)

If you want to restrict the values for a particular column, enter the list of allowed values to create a dropdown menu. You can then select entries from this menu when adding table rows. Leave this field blank if you do not want to restrict the values.

Facet

Select columns to be included in a faceted search to the left of your table. Choose Values to filter from a list of all possible entries for this column. Choose Range to filter with a slider, which is recommended for numeric values. Select a blank field to remove this column from the faceted search.

After you create an empty table, select Table Tools and Upload Data to Table to upload data from a .csv or .tsv file. The first line of your file must match the Table table structure specified.

Alternatively, you may add rows and Table table data manually. To add, delete, or modify existing rows, click on the Edit Query Results icon to Edit Rows.

...

Bulk Edit Table Cell Values (pencil icon) to edit rows.

...

Click the + sign to add rows. To delete rows, check the boxes of the rows to delete and click the Trash Can icon.

Note

Warning: Column names must be 256 characters or less. There are three reserved words that cannot be used: ROW_ID, ROW_VERSION, ROW_ETAG (case insensitive).

...

Modifying a Table Schema

Click Select Table ToolsShow Table Schema and , and then select the Edit Schema to  button to modify the existing Table table structure. From Edit Schema, you can delete columns, add new columns, and modify existing columns, define default column values, restrict column values, and add facet values.

...

Searching a Table

You can search for data within a Table table in two ways. The default search is a simple search menu to the left of your Tabletable. Use the facets to filter your dataset and narrow down your search. Table data can also be retrieved by using a SQL-like query language either through the web portal or through the analytical clients. See the Search Tables and Views page  

(plus) See Querying Tables, Views, and Datasets for more information.

...

Deleting a Table

To delete the entire Tabletable, click on the Table Tools menu and then select Delete Table.

...

. If you do not see this option, you do not have permission to delete the table. Contact an administrator for the project to get permission.

(plus) Learn more about permissions at Sharing Settings, Permissions, and Conditions for Use.

Adding Files to a Table

Synapse Tables support a special column type called File that contains a file handle, an identifier of a File stored In addition to structured data, you can also add individual files to a table in Synapse. In the example below, this feature is used to add image files to a Table table containing histology data.

First, navigate to a Table table and add a new column for Filesfiles. To add columns, Click click Table ToolsShow Table Schema and , and then Edit Schema. From the pop-up window, click the Add Column button and set the Column Type as File. Click Save to exit from the Edit Columns window.

Next, click the Edit Query Results button (the pencil icon). In the column you just created, click the upload icon to add a File file from your local computer.

...

Versioning a Table

You can create a version history for any Table table in Synapse. Versioning helps you keep a record of what changes you made to the Table table and when you made them.

(plus) For more information on versioning a Tabletable, see the Versioning Tables and Views page.

See Also

Annotations and QueriesDownloading DataFiles and Versioning

Include PageDOCS:Article Footer - Need More HelpDOCS:Article Footer - Need More Help, Views, and Datasets.