Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use Cases

Schema Change no Rows

For a table the already exits with a schema and rows:

  1. User selects the edit schema button and is presented with the edit schema dialog
  2. User adds a new column.
  3. User deletes an existing column
  4. User change the type of an existing column
  5. The user moves the newly added column to the top of the list.
  6. User selects save.

All changes from 2 - 5 should be saved in an atomic operation.  This includes column additions, deletes, updates, and column order changes.

Schema Change with CSV Upload

For a table that already with a schema and rows:

  1. User selects a CSV from to upload to the table.
  2. User is presented with a preview of the upload CSV schema and informed that CSV schema does not match that of the table.  The preview is similar to the edit schema column list from the edit schema dialog and contains the columns found in the CSV.
  3. From the above list, the user removes one column
  4. From the above list, the user renames a column.
  5. User selects the upload button.

All changes from 3 - 5 should be saved in an atomic operation.  This includes, column additions, deletes, updates, column order changes.  Since the new schema does not exactly match the CSV, a mapping between column ID and column indices in the CSV must be provided.  The update should also include row additions, deletes and updates from the CSV.


Delete column

The user wishes to clear the contents of a column.  They do this by doing the following:

  1.  Deleting the column from the schema using a command line client.
  2. Add the same column ID back to the table at the same index using a command line client.

All cells in the the column from above should be empty or set to the default of the column.


There are a number of use cases where we want table schema changes as part of the lifecycle of a table. Most requested is certainly the easy case of increasing the size of a string column. More complex is changing a string column to an int column or even changing a string column to a file handle. The other use case is where a partially different dataset is appended to an existing table and it magically merges and rinses the data to the new table format.

Magic aside, I propose the following:

...