Returns a DataSource that includes metadata and data file information, as well as the current status of the DataSource.
GetDataSource provides results in normal or verbose format. The verbose format adds the schema description and the list of files pointed to by the DataSource to the normal format.
Parameters:
-
data_source_id
(EntityId)
–
The ID assigned to the DataSource at creation.
-
verbose
(Optional[Verbose], default:
None
)
–
Specifies whether the GetDataSource operation should return DataSourceSchema.
If true, DataSourceSchema is returned.
If false, DataSourceSchema is not returned.
Raises:
Source code in docs_src/capo_machine_learning/_services/machine_learning.py
| def get_data_source(
self,
data_source_id: "capo_machine_learning.types.entity_id.EntityId",
*,
config_overrides: Optional[MachineLearningClientConfig] = None,
verbose: Optional["capo_machine_learning.types.verbose.Verbose"] = None,
) -> "capo_machine_learning.types.get_data_source_output.GetDataSourceOutput":
"""<p>Returns a <code>DataSource</code> that includes metadata and data file information, as well as the current status of the <code>DataSource</code>.</p> <p> <code>GetDataSource</code> provides results in normal or verbose format. The verbose format adds the schema description and the list of files pointed to by the DataSource to the normal format.</p>
Args:
data_source_id: <p>The ID assigned to the <code>DataSource</code> at creation.</p>
verbose: <p>Specifies whether the <code>GetDataSource</code> operation should return <code>DataSourceSchema</code>.</p> <p>If true, <code>DataSourceSchema</code> is returned.</p> <p>If false, <code>DataSourceSchema</code> is not returned.</p>
Raises:
capo_machine_learning.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred when trying to process a request.</p>
capo_machine_learning.errors.invalid_input_exception.InvalidInputException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
capo_machine_learning.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource cannot be located.</p>
capo_machine_learning.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_machine_learning.types.get_data_source_input.GetDataSourceInput]",
) -> OperationResponse[
"capo_machine_learning.types.get_data_source_output.GetDataSourceOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.get_data_source
output, http_response = (
capo_machine_learning._operations.amazon_ml_20141212.get_data_source.get_data_source(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDataSource")
)
input_: capo_machine_learning.types.get_data_source_input.GetDataSourceInput = {
"data_source_id": data_source_id
}
if verbose is not None:
input_["verbose"] = verbose
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|