Skip to content

Commit b083256

Browse files
edgaojatinyadav-cc
authored andcommitted
📝 add instructions for soft reset (airbytehq#35335)
1 parent 02c1cb0 commit b083256

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

docs/using-airbyte/core-concepts/typing-deduping.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ You also now see the following changes in Airbyte-provided columns:
105105

106106
## On final table re-creation
107107

108-
From time to time, Airbyte will drop and re-create the final table produced by a sync. This is done
109-
as transitionally as possible, and should be invisible to most observers. This is done for a number
110-
of reasons, including:
108+
From time to time, Airbyte will drop and re-create the final table produced by a sync (sometimes
109+
called a "soft reset"). This is done as transactionally as possible, and should be invisible to most
110+
observers. This is done for a number of reasons, including:
111111

112112
- **Schema Migrations** - Many destinations lack the ability to control column order, or cannot
113113
alter one data type to another. Re-creating the table allows Airbyte to strictly control the
@@ -123,6 +123,18 @@ table outside of Airbyte could be lost during a sync. Many destinations provide
123123
wildcards to grant permissions to tables, which are better suited for this ELT process. We do not
124124
recommend altering the final tables (e.g. adding constraints) as it may cause issues with the sync.
125125

126+
### Manually triggering a final table re-creation
127+
128+
In some cases, you need to manually run a soft reset - for example, if you accidentally delete some
129+
records from the final table and want to repopulate them from the raw data. This can be done by:
130+
1. Dropping the final table entirely (`DROP TABLE <your_final_table>`)
131+
1. Unsetting the raw table's `_airbyte_loaded_at` column
132+
(`UPDATE airbyte_internal.<your_raw_table> SET _airbyte_loaded_at = NULL`)
133+
1. If you are using a nonstandard raw table schema, replace `airbyte_internal` with that schema.
134+
1. And then running a sync.
135+
136+
After the sync completes, your final table will be restored to its correct state.
137+
126138
## Loading Data Incrementally to Final Tables
127139

128140
:::note

0 commit comments

Comments
 (0)