Skip to main content

library

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

Overview

Namelibrary
TypeResource
Idazure.synapse_artifacts.library

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.
containerNamestringContainer name of the library/package.
creatorIdstringCreator Id of the library/package.
etagstringResource Etag.
pathstringLocation of library/package in storage account.
provisioningStatusstringProvisioning status of the library/package.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uploadedTimestampstringThe last update time of the library/package.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlibrary_name, endpointGet Library.
get_operation_resultselectoperation_id, endpointGet Operation result for Library.
listselectendpointLists Library.
createinsertlibrary_name, endpointCreates a library with the library name.
deletedeletelibrary_name, endpointDelete Library.
flushexeclibrary_name, endpointFlush Library.

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
endpointstringThe service endpoint host (no scheme). (default: )
library_namestringfile name to upload. Minimum length of the filename should be 1 excluding the extension length. Required.
operation_idstringoperation id for which status is requested. Required.

SELECT examples

Get Library.

SELECT
id,
name,
containerName,
creatorId,
etag,
path,
provisioningStatus,
type,
uploadedTimestamp
FROM azure.synapse_artifacts.library
WHERE library_name = '{{ library_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Creates a library with the library name.

INSERT INTO azure.synapse_artifacts.library (
library_name,
endpoint
)
SELECT
'{{ library_name }}',
'{{ endpoint }}'
RETURNING
id,
name,
artifactId,
changed,
created,
operationId,
recordId,
state,
type
;

DELETE examples

Delete Library.

DELETE FROM azure.synapse_artifacts.library
WHERE library_name = '{{ library_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Flush Library.

EXEC azure.synapse_artifacts.library.flush 
@library_name='{{ library_name }}' --required,
@endpoint='{{ endpoint }}' --required
;