Skip to main content

Manage File Uploads

This applies to: Visual Data Discovery

Symphony can visualize data from file uploads including CSV, JSON, and TSV files.

  • The maximum supported file size is 500 MB

  • Data from the file upload is stored in a PostgreSQL database

  • When you upload a flat data file, the first 1,000 records are used to determine if fields are imported as NUMBER or INTEGER.

    • If there are no decimal number records in the first 1,000 records, the numeric fields are imported as INTEGER instead of NUMBER: any decimal number records after row 1,000 may not upload fully.

    • To ensure all records are imported, sort your data to ensure decimal numbers are included in the first 1,000 records.

Before you can establish a connection from Symphony to your file uploads storage, a connector server needs to be installed and configured. See Manage Connectors and Connector Servers for general instructions.

After the connector has been set up, create a data source configuration and upload your file or files to that source. See:

Upload a New File in Visual Data Discovery

  1. Log in as a user with the Administer Sources or Create New Data Sources privilege.

  2. Create or edit an existing data source.

  3. Select Add to add a new data entity, then select From File.

  4. Add a unique Data Entity Name, then select Upload New File. The File Upload work area opens.

    Add, set up, and preview file uploads

  5. Enter File Details, such as a unique Display Name, and optional Description.

  6. Use the Browse button to select a file to upload.

  7. After you have selected a file, Symphony may autofill the Single Quote Char. and Field Delimiter fields. Adjust if needed.

  8. If needed, change the No. of records to display from 10 to up to 1,000 records.

  9. Enable or disable the checkbox Column Headers in first row to match your file layout. If no column headers are in your data, Symphony assigns numerical column headings, field_1, field_2, and so on.

  10. Optionally, select Preview to preview your data.

  11. Enable the checkbox Use Only File Structure to create the file using only the existing file structure, no data.

  12. Enable the checkbox Disable Integer to Time Auto Detection to prevent auto detection of time fields.

  13. Select Save to close the File Upload work area and continue creating or updating your data entity for this source.

Edit an Existing File in Visual Data Discovery

  1. Log in as a user with the Administer Sources or Create New Data Sources privilege.

  2. Edit an existing data source.

  3. Select the data entity with the file you want to edit, then select Edit File. The File Upload work area opens.

  4. Browse for a new file.

    • If you are replacing the existing file, your new file must use the same data file structure as the existing file. Enable the Replace checkbox in Upload Settings: previous data is replaced.

    • If you are adding data to the existing file, your new file must use the same data file structure as the existing file. Disable the Replace checkbox in Upload Settings: previous data is appended with new rows of data.

  5. Select Preview to preview your data.

    • The Current Data tab shows the data of your existing file.

    • The New Data shows the replaced or amended data preview.

  6. Select Save to Save your changes or Cancel to discard your changes. The File Upload work area closes.

API Endpoints

  1. Log in as a user with the Administer Sources or Create New Data Sources privilege.

  2. Edit an existing data source.

  3. Select the data entity with the file you want to edit, then select API Endpoints. The API Endpoints dialog box opens.

    The dialog offers convenient example cURL requests but the APIs can be leveraged from your preferred development platform.

  4. Copy and modify the example cURL requests to include your own Symphony credentials, replacing the placeholders for username and password. Select Close to close the dialog.

Work with the Upload API

There are two operations that can be performed using the Upload API: appending additional data and clearing previously uploaded data. The source creation page offers convenient example cURL requests but the APIs can be leveraged from your preferred development platform. Select API Endpoints on the source creation tab to edit your data.

Modify the example cURL requests to include your own Symphony credentials, replacing the placeholders for username and password.

curl -v --user <username>:<password> <YourServer>

Example: Append Data

In the following example, the Upload API accepts an array of JSON objects. Note that the object field types must match those used to create the Upload API source originally. For example, if the value of the price field is a number, you can not upload new rows in which the value of the price field is a string.

curl -v --user <username>:<password> 'https://<Your_Composer_Server>/ composer/api/upload/<YourDataSourceId>' -X POST -H "Content-Type: application/vnd.composer.v3+json" -d '[{"price":100.5,"venue_id":"V678","venue_name": "Pizza Barn"}]' --insecure

Example: Clear Previously Uploaded Data

In the example below, the Upload API will clear all previously uploaded data from the data source with the ID of <YourDataSourceId>.

curl -v --user <username>:<password> 'https://<Your_Symphony_Server>/ api/upload/<YourDataSourceId>' -X DELETE --insecure

Feature Support

File upload support for specific features is shown in the following table.

Key: Y - Supported; N - Not Supported; N/A - not applicable

Feature Supported?

Admin-Defined Functions

Y

Box Plots

Y

Custom SQL Queries

Y

Derived Fields (Row-Level Expressions)

Y

Distinct Counts

Y

Fast Distinct Values

N/A

Group By Multiple Fields

Y

Group By Time

Y

Group By UNIX Time

Y

Histogram Floating Point Values

Y

Histograms

Y

Kerberos Authentication

N

Last Value

Y

Live Mode and Playback

Y

Multivalued Fields

N/A

Nested Fields

N/A

Partitions

N

Pushdown Joins for Fusion Data Sources

Y

Schemas

Y

Text Search

N/A

TLS

Y

User Delegation

N

Wildcard Filters

Y

Wildcard Filters, Case-Insensitive Mode

Y

Wildcard Filters, Case-Sensitive Mode

Y

Connecting to Flat Files in Managed Dashboards

This applies to: Managed Dashboards, Managed Reports

Drag and Drop a Flat File

Just like with Excel files, you can drag a CSV or other text file from Windows Explorer or Finder and drop it onto the Symphony Explore window or the dashboard canvas.

Drag a flat file from Windows Explorer

This will automatically import the flat file data to Symphony and create a corresponding data connector.

Data connector is created automatically

Connect to a CSV File

As an alternative to dragging and dropping as shown above, the following walkthrough shows you how to manually create a data connector for a text file which contains comma-delimited stock price data.

Date,Close,Volume,Open,Low,High 2006-01-03,82.06,11715200,82.45,80.81,82.55 2006-01-04,81.95,9837800,82.2,81.33,82.5 2006-01-05,82.5,7213500,81.4,80.999,82.9 2006-01-06,84.95,8197300,83.95,83.41,85.03 2006-01-09,83.73,6857800,83.9,83.38,84.25 2006-01-10,84.07,5701000,83.15,83.12,84.12 2006-01-11,84.17,5776400,84.37,83.4,84.81 2006-01-12,83.57,4924100,83.82,83.4,83.96 2006-01-13,83.17,6921700,83,82.5,83.45 ...

To begin, go to the main menu, select New, and then select Data Connector.

In the New Data Connector dialog, click inside the Name box, and enter a name for your data connector.

Select the Data Provider drop-down and choose Flat Files.

Set up a new data connector

Next, specify the CSV file using one of two options:

  • Select Choose File and use the file selector to select the CSV file to be imported. Note that changes to the original file will no longer affect the generated data connector.

  • Or, use the Text File field to specify the full network path or web address to the file (e.g., \\server1\shared\stockdata.csv). Note that changes to the original file will affect the data once the data connector gets refreshed. Use the Authentication setting above to change how Symphony should access the file if access is restricted.

Choose the flat file or enter its path

For CSV files, the first line of data often contains the header text values. In this case, make sure the First Line Is Header option is checked.

If your data values are not surrounded by quotation marks, click to expand the Advanced section and clear Fields Are Enclosed In Quotes.

The Define Structure option lets you define the table and column names and data types, but it is recommended to just select Submit at the bottom of the dialog and let the auto-discovery run first. You can then go back and edit the discovered columns if needed.

Go to Explore and locate the newly added data connector. Expand it to see the CSV file and its discovered columns. Drag the file to the dashboard canvas to see its values displayed in a table visualization (in Raw Data format).

Explore newly created flat file data connector

Note: An imported file will be automatically warehoused after the first use to improve performance.

Define Columns

Symphony can automatically discover the structure of the file, as well as details such as the delimiter character and culture code page when the data connector is first created. Afterwards, you can redefine these settings as needed.

First, locate the flat file data connector from the main menu or from the Explore window. Right-click (or long tap) on the data connector and select Edit from the context menu.

The Character Used As Delimiter is auto-detected by default, but you can change it if necessary. If your text file is delimited by Tab characters, just click inside the box, delete any existing character, and then type the Tab key, or right-click and choose the tab option.

In the Edit Data Connector dialog, scroll down and select Define structure.

Select Define structure

In the Define Data Structure dialog, select the table and then scroll down to see the discovered columns. The columns are discovered on-demand so if you don't see any listed, select Re-discover table.

Discovered columns

Select a column and then set the details for the column as needed. For example, date/time columns are discovered as string columns so you'll want to change the data type to Date/Time.

Define column details

Read Multiple Files

Symphony can read multiple files under the same folder. To do this, specify the path using a wildcard character as a filename. Files with the same structure will be loaded simultaneously.

For example, the folder below contains 2 CSV files with the same structure:

Files inside a folder

In the Text File field, specify the path using a wildcard character to represent the part of the filename that changes. For example, \\server1\shared\*.csv.

The data from all files will be included together, and File Name is one of the columns you can access:

Structure

For more information, see:

Was this article helpful?

We're sorry to hear that.

Powered by Zendesk