sasctl.services.data_sources#
- class sasctl._services.data_sources.DataSources[source]#
Bases:
Service
Enables retrieval of data source metadata.
The Data Sources API works in concert with the Data Tables and Row Sets APIs to navigate, reference, and retrieve data in the SAS Viya ecosystem. The Data Sources API enables retrieval of metadata for data sources and linking to their respective tables.
- classmethod get_provider(provider, refresh=False)[source]#
Returns a provider instance.
- Parameters:
- Returns:
RestObj or None – A dictionary containing the provider attributes or None.
Notes
If provider is a complete representation of the provider it will be returned unless refresh is set. This prevents unnecessary REST calls when data is already available on the client.
- classmethod get_source(provider, source)[source]#
Returns a data source belonging to a given provider.
- classmethod list_caslibs(source='cas-shared-default', filter_=None)[source]#
Get all caslibs registered with the given CAS server.
- Parameters:
- Returns:
list – A collection of
RestObj
instances.
Notes
See the filtering reference for details on the filter parameter.
- classmethod list_providers(filter=None, start=None, limit=None, **kwargs)#
List all providers available in the environment.
- Parameters:
- Returns:
list – A list of dictionaries containing the providers.
Notes
See the filtering reference for details on the filter parameter.
- classmethod list_tables(caslib, filter_=None, session_id=None)[source]#
List tables available in a caslib.
- Parameters:
- Returns:
list – A collection of
RestObj
instances.
Notes
See the filtering reference for details on the filter parameter.
- classmethod table_uri(table)[source]#
Get the URI identifying a table.
- Parameters:
table (dict or swat.cas.table.CASTable)
- Returns:
str – table URI