Skip to content

Commit

Permalink
Merge pull request #843 from solliancenet/cp-sql-multi-part-fix
Browse files Browse the repository at this point in the history
RELEASE 0.5.1: Update SQL multipart validation
  • Loading branch information
ciprianjichici authored Apr 5, 2024
2 parents 32a3911 + 7f2a35d commit e5832c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/setup-guides/vectorization/vectorization-triggering.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ The following table describes the meaning of the multipart strings for the `Azur
| 1 | The name of the database schema. |
| 2 | The name of the table. |
| 3 | The name of the column that stores file content. |
| 4 | The name of the column that stores file identifiers (file names). |
| 5 | The file identifier (file name). |

| 4 | The name of the column that stores file row identifier. |
| 5 | The value of the row identifier. |
| 5 | The file file name. |

### Known neutral URLs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ public AzureSQLDatabaseContentSourceService(
/// contentId[0] = the schema.
/// contentId[1] = the table.
/// contentId[2] = the column containing the contents of the files.
/// contentId[3] = the column containing the file names.
/// contentId[4] = the name of the file.
/// contentId[3] = the column name of the unique identifier for the row of the file.
/// contentId[4] = the value of the unique identifier of the file.
/// contentId[5] = the file name.
/// </remarks>
public async Task<string> ExtractTextAsync(ContentIdentifier contentId, CancellationToken cancellationToken)
{
contentId.ValidateMultipartId(5);
contentId.ValidateMultipartId(6);

var binaryContent = await GetBinaryContent(
contentId[0],
Expand Down Expand Up @@ -80,7 +81,7 @@ private async Task<BinaryData> GetBinaryContent(string schema, string tableName,
}
catch (Exception ex)
{
_logger.LogError(ex, "Error extracting content from the file identified by {FileName}.", identifierValue);
_logger.LogError(ex, "Error extracting content from the file identified by {identifierValue}.", identifierValue);
throw new VectorizationException($"Error extracting content from file identified by {identifierValue}.", ex);
}
}
Expand Down

0 comments on commit e5832c2

Please sign in to comment.