QuestionQ97

VerifiedImplement AI capabilities in database solutions

You have an Azure SQL database named SalesDB. SalesDB contains a table named dbo.Articles with these columns:

  • ArticleId
  • Title
  • Body
  • LastModifiedUtc
  • EmbeddingVector

An application generates embeddings from the concatenation of Title and Body and stores the results in EmbeddingVector.

You plan to implement incremental embedding maintenance by using change data capture (CDC) to update embeddings only for rows that change, without scanning the entire table.

Ensure that only the columns required to generate embeddings are captured and that the solution supports querying net changes.

Each value may be used once, more than once, or not at all.

Drag & Drop
USE [SalesDB];
GO

GO

EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Articles',
    @role_name = NULL,
    @captured_column_list = ,
    @supports_net_changes = ;
GO
Explanation

Enable CDC at the database scope with sys.sp_cdc_enable_db. Title and Body are the embedding inputs, while ArticleId supplies the row identity needed for net-changes processing. Setting @supports_net_changes to 1 enables net-changes query support; LastModifiedUtc and EmbeddingVector are not required inputs for generating the embedding.

Community Discussion

No comments yet. Be the first to start the discussion!