def sample_get_dataset():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetDatasetRequest(name="name_value", )

    # Make the request
    response = client.get_dataset(request=request)

    # Handle the response
    print(response)
Example #2
0
def sample_list_datasets():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListDatasetsRequest(parent="parent_value", )

    # Make the request
    page_result = client.list_datasets(request=request)

    # Handle the response
    for response in page_result:
        print(response)
def sample_delete_dataset():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteDatasetRequest(name="name_value", )

    # Make the request
    operation = client.delete_dataset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Example #4
0
def sample_update_dataset():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    dataset = aiplatform_v1.Dataset()
    dataset.display_name = "display_name_value"
    dataset.metadata_schema_uri = "metadata_schema_uri_value"
    dataset.metadata.null_value = "NULL_VALUE"

    request = aiplatform_v1.UpdateDatasetRequest(dataset=dataset, )

    # Make the request
    response = client.update_dataset(request=request)

    # Handle the response
    print(response)
def sample_export_data():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    export_config = aiplatform_v1.ExportDataConfig()
    export_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"

    request = aiplatform_v1.ExportDataRequest(
        name="name_value",
        export_config=export_config,
    )

    # Make the request
    operation = client.export_data(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Example #6
0
def sample_import_data():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    import_configs = aiplatform_v1.ImportDataConfig()
    import_configs.gcs_source.uris = ['uris_value_1', 'uris_value_2']
    import_configs.import_schema_uri = "import_schema_uri_value"

    request = aiplatform_v1.ImportDataRequest(
        name="name_value",
        import_configs=import_configs,
    )

    # Make the request
    operation = client.import_data(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Example #7
0
def sample_create_dataset():
    # Create a client
    client = aiplatform_v1.DatasetServiceClient()

    # Initialize request argument(s)
    dataset = aiplatform_v1.Dataset()
    dataset.display_name = "display_name_value"
    dataset.metadata_schema_uri = "metadata_schema_uri_value"
    dataset.metadata.null_value = "NULL_VALUE"

    request = aiplatform_v1.CreateDatasetRequest(
        parent="parent_value",
        dataset=dataset,
    )

    # Make the request
    operation = client.create_dataset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)