Closed dynamobi-build closed 12 years ago
[author="rzhang", created="Fri, 5 Mar 2010 04:56:40 -0800"]
I have a question on comparing the column.
Can we verify the column based on uuid?
[author="ngoodman", created="Fri, 5 Mar 2010 06:34:01 -0800"]
I think we can use the UUID for this (which is based on the lineage_id). However, since the remote client may not have the UUID (we want to enable other editors to post tables) and it's optional I think it's better to use the table/column name as the unique-ness.
I'm pretty sure the column name is guaranteed to be unique in a table.
[author="ksecretan", created="Thu, 24 Jun 2010 12:04:36 -0700"]
See revision:174 and revision:173. (Sorry for forgetting to put this feature key in the commit message.)
[reporter="ngoodman", created="Wed, 3 Mar 2010 21:44:16 -0800", resolved="Thu, 24 Jun 2010 12:04:36 -0700"]
Implement a POST web service that will receive a Table object.
@Path("/{catalog}/{schema}/{table}")
@POST
public TableDetails postTableDetails(@PathParam("catalog") String catalogName, @PathParam("schema")String schema,
@PathParam("table") String table) throws AppException;
The TableDetails object will contain information about the columns etc. Here is an example of a TableDetails:
−
The logic for the webservice is:
If the table does not exist, create the table (LOCALDB/TESTING/T1) with all the columns.
If the table already exists, compare the columns with the columns in the database. ADD any columns that are in the TableDetails that are NOT in the database given the datatypes/etc. If there are any columns that aren't in TableDetails that are in the database, throw an AppException (cannot remove columns).