Xerox DocuShare Administrator Guide
| Audience: DocuShare administrators |
Create and Manage Custom Database Tables in DocuShare
Overview
A DocuShare Custom Database stores reference data that custom properties and other DocuShare components can use. Create the Custom Database once for the site, then add tables for data such as vendor lists, customer records, or cost centers. Tables are created from CSV files.
Version note: The new 8.1 CSV ingestion capabilities are described in Import Custom Database Data with Content Intake.
Before You Begin
- Sign in with an account that can access the Administration menu.
- Prepare a CSV file whose first row defines each column name and SQL data type. Data rows must match the column count and data types.
- Format date values as ISO 8601.
- Choose a table name of no more than 25 characters. Use letters, numbers, and underscores; do not use spaces.
Create the Custom Database
1. Go to Admin > Services and Components > Database > Custom Database.
2. If the site does not yet have a Custom Database, enter a database name and submit the form.
3. After creation, use the Custom Table page to add and manage tables.
The Custom Database is created once per site and reused for its custom tables.
Add a Table
1. On the Custom Table page, select Add Table.
2. Upload the CSV file.
3. Enter a table name and, optionally, a description. The description can be up to 100 characters.
4. Submit the form.
DocuShare creates the table from the CSV header and imports its rows. For example, a CSV header can define vendor_name VARCHAR(256) NOT NULL, amount NUMERIC(100,2), and contact_fn VARCHAR(256). Use the format required by the database provider configured for your site.
View, Update, or Download a Table
- View Table displays the table's column names, data types, and the first 10 data rows.
- Update Table can append rows from a CSV or replace the existing rows. Append is the default. Replace deletes the current rows before loading the replacement data. If you only change the description, submit the update without a CSV.
- Download as CSV exports the table data in a format that can be used again with the Add or Update actions.
For an append, make sure the uploaded CSV columns and values are compatible with the existing table schema. An incompatible file can fail to load.
Delete a Table
Select Delete for the table and confirm. DocuShare prevents deletion while a custom property is linked to that table. Remove the property linkage first, then delete the table. Deleting a table removes its data.
Troubleshooting
- If a CSV upload fails, check the .csv extension, the header's column names and SQL types, date formatting, and whether each data row matches the header's column count.
- If the table name is rejected, remove spaces and special characters other than underscores, and keep the name within 25 characters.
- If a table cannot be deleted, check whether AutoComplete or another custom property still references it.