<@U04SE163WC8> java.util.concurrent.CompletionEx...
# ask-ai
a
@kapa.ai java.util.concurrent.CompletionException: io.airbyte.integrations.base.destination.typing_deduping.UnexpectedSchemaException: Destination V2 Raw Table does not match expected Schema at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) Using MSSQL source connector
k
It seems like you're encountering an issue with the schema of your Destination V2 Raw Table not matching the expected schema. This could be due to a variety of reasons, such as changes in the schema or database of Airbyte's "raw" tables to be compatible with the new Destinations V2 format as mentioned in the [MS SQL Server Migration Guide](https://docs.airbyte.com/integrations/destinations/mssql-migrations#upgrading-to-100). One possible solution could be to migrate your data from the old raw table to the new raw table. Here's a SQL query provided in the MS SQL Server Migration Guide that you can use to do this:
Copy code
sql -- assumes your schema was 'default'   -- replace `{{stream_name}}` with replace your stream name      CREATE TABLE airbyte_internal.default_raw__stream_{{stream_name}} (    _airbyte_raw_id VARCHAR(64) PRIMARY KEY,    _airbyte_data NVARCHAR(MAX),    _airbyte_extracted_at DATETIMEOFFSET(7) DEFAULT SYSDATETIMEOFFSET(),    _airbyte_loaded_at DATETIMEOFFSET(7),    _airbyte_meta NVARCHAR(MAX)   );      INSERT INTO airbyte_internal.default_raw__stream_{{stream_name}}   SELECT       _airbyte_ab_id AS _airbyte_raw_id,       _airbyte_data as _airbyte_data,       _airbyte_emitted_at as _airbyte_extracted_at,       NULL as _airbyte_loaded_at,       NULL as _airbyte_meta   FROM airbyte._airbyte_raw_{{stream_name}}
Please note that this upgrade will ignore any existing raw tables and will not migrate any data to the new schema. Also, Airbyte will not delete any of your v1 data. If you're still encountering issues, it might be helpful to check the [Github Issues](https://github.com/airbytehq/airbyte/issues) related to Airbyte for any similar problems and their solutions.
a
@kapa.ai where do I run the Commands above
k
A message from kapa.ai
The SQL commands provided should be run in your SQL Server Management Studio or any other SQL client that you use to interact with your MS SQL Server database. Here are the steps: 1. Open your SQL Server Management Studio. 2. Connect to the database server where your Airbyte data is stored. 3. Open a new query window. 4. Copy and paste the SQL commands into the query window. 5. Replace
{{stream_name}}
with the name of your stream. 6. Execute the query. Please ensure you have the necessary permissions to create and modify tables in your database.