sources
Creates, updates, deletes, gets or lists a sources resource.
Overview
| Name | sources |
| Type | Resource |
| Id | azure.ai_language.sources |
Fields
The following fields are returned by SELECT queries:
- list_sources
| Name | Datatype | Description |
|---|---|---|
contentStructureKind | string | Content structure type for sources. "unstructured" (unstructured) |
displayName | string | Friendly name of the Source. |
lastUpdatedDateTime | string (date-time) | Date-time when the QnA was last updated. |
source | string | Unique source identifier. Name of the file if it's a 'file' source; otherwise, the complete URL if it's a 'url' source. Required. |
sourceKind | string | Supported source types. Required. Known values are: "file" and "url". (file, url) |
sourceUri | string | URI location for the file or url. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_sources | select | project_name, endpoint | top, skip, maxpagesize | Gets all the sources of a project. |
update_sources | update | project_name, endpoint, op, value | Updates the sources of a project. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client Endpoint parameter. (default: ) |
project_name | string | The name of the project to use. Required. |
maxpagesize | integer | |
skip | integer | An offset into the collection of the first resource to be returned. Default value is None. |
top | integer | The maximum number of resources to return from the collection. Default value is None. |
SELECT examples
- list_sources
Gets all the sources of a project.
SELECT
contentStructureKind,
displayName,
lastUpdatedDateTime,
source,
sourceKind,
sourceUri
FROM azure.ai_language.sources
WHERE project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND maxpagesize = '{{ maxpagesize }}'
;
UPDATE examples
- update_sources
Updates the sources of a project.
UPDATE azure.ai_language.sources
SET
op = '{{ op }}',
value = '{{ value }}'
WHERE
project_name = '{{ project_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND op = '{{ op }}' --required
AND value = '{{ value }}' --required;