Skip to main content

dataset

Creates, updates, deletes, gets or lists a dataset resource.

Overview

Namedataset
TypeResource
Idazure.synapse_artifacts.dataset

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
objectUnmatched properties from the message are deserialized to this collection.
annotationsarrayList of tags that can be used for describing the Dataset.
descriptionstringDataset description.
etagstringResource Etag.
folderobjectThe folder that this Dataset is in. If not specified, Dataset will appear at the root level.
linkedServiceNameobjectLinked service reference. Required.
parametersobjectParameters for dataset.
schemaobjectColumns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement.
structureobjectColumns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_datasetselectdataset_name, endpointIf-None-MatchGets a dataset.
get_datasets_by_workspaceselectendpointLists datasets.
create_or_update_datasetinsertdataset_name, endpoint, type, linkedServiceNameIf-MatchCreates or updates a dataset.
create_or_update_datasetreplacedataset_name, endpoint, type, linkedServiceNameIf-MatchCreates or updates a dataset.
delete_datasetdeletedataset_name, endpointDeletes a dataset.
rename_datasetexecdataset_name, endpointRenames a dataset.

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.

NameDatatypeDescription
dataset_namestringThe dataset name. Required.
endpointstringThe service endpoint host (no scheme). (default: )
If-MatchstringETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. Default value is None.
If-None-MatchstringETag of the dataset entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. Default value is None.

SELECT examples

Gets a dataset.

SELECT
id,
name,
,
annotations,
description,
etag,
folder,
linkedServiceName,
parameters,
schema,
structure,
type
FROM azure.synapse_artifacts.dataset
WHERE dataset_name = '{{ dataset_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
;

INSERT examples

Creates or updates a dataset.

INSERT INTO azure.synapse_artifacts.dataset (
,
type,
description,
structure,
schema,
linkedServiceName,
parameters,
annotations,
folder,
dataset_name,
endpoint,
If-Match
)
SELECT
'{{ }}',
'{{ type }}' /* required */,
'{{ description }}',
'{{ structure }}',
'{{ schema }}',
'{{ linkedServiceName }}' /* required */,
'{{ parameters }}',
'{{ annotations }}',
'{{ folder }}',
'{{ dataset_name }}',
'{{ endpoint }}',
'{{ If-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;

REPLACE examples

Creates or updates a dataset.

REPLACE azure.synapse_artifacts.dataset
SET
= '{{ }}',
type = '{{ type }}',
description = '{{ description }}',
structure = '{{ structure }}',
schema = '{{ schema }}',
linkedServiceName = '{{ linkedServiceName }}',
parameters = '{{ parameters }}',
annotations = '{{ annotations }}',
folder = '{{ folder }}'
WHERE
dataset_name = '{{ dataset_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND type = '{{ type }}' --required
AND linkedServiceName = '{{ linkedServiceName }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a dataset.

DELETE FROM azure.synapse_artifacts.dataset
WHERE dataset_name = '{{ dataset_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Renames a dataset.

EXEC azure.synapse_artifacts.dataset.rename_dataset 
@dataset_name='{{ dataset_name }}' --required,
@endpoint='{{ endpoint }}' --required
;