From a19be3b51d2b74ccde17843352e995c71b623290 Mon Sep 17 00:00:00 2001 From: Rishabh Ghosh <105623976+fivetran-rishabhghosh@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:58:20 +0530 Subject: [PATCH] doc(partner_sdk): Alter Table operation guidelines (#71) * doc(partner_sdk): Alter Table operation guidelines * Update development-guide.md Co-authored-by: Dejan Tucakov <141165749+fivetran-dejantucakov@users.noreply.github.com> * review comments * Update development-guide.md Co-authored-by: Dejan Tucakov <141165749+fivetran-dejantucakov@users.noreply.github.com> --------- Co-authored-by: Dejan Tucakov <141165749+fivetran-dejantucakov@users.noreply.github.com> --- development-guide.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/development-guide.md b/development-guide.md index cd4225c..7714f52 100644 --- a/development-guide.md +++ b/development-guide.md @@ -125,6 +125,10 @@ This operation should report all columns in the destination table, including Fiv - This operation might be requested for a table that does not exist in the destination. In that case, it should NOT fail, simply ignore the request and return `success = true`. - `utc_delete_before` has millisecond precision. +#### AlterTable +- This operation should be used for changing primary key columns, adding columns, and changing data types. +- However, this operation should not drop any columns even if the `AlterTable` request has a table with a different set of columns. Dropping columns could lead to unexpected customer data loss and is against Fivetran's general approach to data movement. + #### WriteBatchRequest - `replace_files` is for the `upsert` operation where the rows should be inserted if they don't exist or updated if they do. Each row always provides values for all columns. Populate the `_fivetran_synced` column in the destination with the values coming in from the CSV files.