Skip to content

Commit

Permalink
feat: new service DataTaxonomyService and related messages (#6486)
Browse files Browse the repository at this point in the history
feat: DataProfileSpec message with DataProfileScan related settings
feat: added TopNValue.ratio
feat: added DataQualitySpec.sampling_percent, row_filter
feat: added DataQualityRule.name, description
feat: added ListDataScanJobsRequest.filter to filter ListDataScanJob results
feat: added JobEvent.execution_trigger
feat: added DataScanEvent.data_profile_configs, data_quality_configs, post_scan_actions_result
feat: added RunTaskRequest.labels, args
feat: added Job.labels, trigger, execution_spec
PiperOrigin-RevId: 550722409
Source-Link: googleapis/googleapis@eb16ce4
Source-Link: googleapis/googleapis-gen@6dbf803
Copy-Tag: eyJwIjoiRGF0YXBsZXgvLk93bEJvdC55YW1sIiwiaCI6IjZkYmY4MDMxNDkyY2JmMjc2YzE1M2QyNDcwMjg0ODQ4OWRkODQxMmQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Jul 27, 2023
1 parent 79345bd commit d99dfbd
Show file tree
Hide file tree
Showing 112 changed files with 18,456 additions and 172 deletions.
Binary file modified Dataplex/metadata/V1/DataProfile.php
Binary file not shown.
Binary file modified Dataplex/metadata/V1/DataQuality.php
Binary file not shown.
Binary file added Dataplex/metadata/V1/DataTaxonomy.php
Binary file not shown.
Binary file modified Dataplex/metadata/V1/Datascans.php
Binary file not shown.
Binary file modified Dataplex/metadata/V1/Logs.php
Binary file not shown.
34 changes: 34 additions & 0 deletions Dataplex/metadata/V1/Security.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions Dataplex/metadata/V1/Service.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Dataplex/metadata/V1/Tasks.php
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient;
use Google\Cloud\Dataplex\V1\CreateDataAttributeRequest;
use Google\Cloud\Dataplex\V1\DataAttribute;
use Google\Rpc\Status;

/**
* Create a DataAttribute resource.
*
* @param string $formattedParent The resource name of the parent data taxonomy
* projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
* Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field.
* @param string $dataAttributeId DataAttribute identifier.
* * Must contain only lowercase letters, numbers and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the DataTaxonomy.
*/
function create_data_attribute_sample(string $formattedParent, string $dataAttributeId): void
{
// Create a client.
$dataTaxonomyServiceClient = new DataTaxonomyServiceClient();

// Prepare the request message.
$dataAttribute = new DataAttribute();
$request = (new CreateDataAttributeRequest())
->setParent($formattedParent)
->setDataAttributeId($dataAttributeId)
->setDataAttribute($dataAttribute);

// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $dataTaxonomyServiceClient->createDataAttribute($request);
$response->pollUntilComplete();

if ($response->operationSucceeded()) {
/** @var DataAttribute $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataTaxonomyServiceClient::dataTaxonomyName(
'[PROJECT]',
'[LOCATION]',
'[DATA_TAXONOMY_ID]'
);
$dataAttributeId = '[DATA_ATTRIBUTE_ID]';

create_data_attribute_sample($formattedParent, $dataAttributeId);
}
// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient;
use Google\Cloud\Dataplex\V1\CreateDataAttributeBindingRequest;
use Google\Cloud\Dataplex\V1\DataAttributeBinding;
use Google\Rpc\Status;

/**
* Create a DataAttributeBinding resource.
*
* @param string $formattedParent The resource name of the parent data taxonomy
* projects/{project_number}/locations/{location_id}
* Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field.
* @param string $dataAttributeBindingId DataAttributeBinding identifier.
* * Must contain only lowercase letters, numbers and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the Location.
*/
function create_data_attribute_binding_sample(
string $formattedParent,
string $dataAttributeBindingId
): void {
// Create a client.
$dataTaxonomyServiceClient = new DataTaxonomyServiceClient();

// Prepare the request message.
$dataAttributeBinding = new DataAttributeBinding();
$request = (new CreateDataAttributeBindingRequest())
->setParent($formattedParent)
->setDataAttributeBindingId($dataAttributeBindingId)
->setDataAttributeBinding($dataAttributeBinding);

// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $dataTaxonomyServiceClient->createDataAttributeBinding($request);
$response->pollUntilComplete();

if ($response->operationSucceeded()) {
/** @var DataAttributeBinding $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]');
$dataAttributeBindingId = '[DATA_ATTRIBUTE_BINDING_ID]';

create_data_attribute_binding_sample($formattedParent, $dataAttributeBindingId);
}
// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient;
use Google\Cloud\Dataplex\V1\CreateDataTaxonomyRequest;
use Google\Cloud\Dataplex\V1\DataTaxonomy;
use Google\Rpc\Status;

/**
* Create a DataTaxonomy resource.
*
* @param string $formattedParent The resource name of the data taxonomy location, of the form:
* projects/{project_number}/locations/{location_id}
* where `location_id` refers to a GCP region. Please see
* {@see DataTaxonomyServiceClient::locationName()} for help formatting this field.
* @param string $dataTaxonomyId DataTaxonomy identifier.
* * Must contain only lowercase letters, numbers and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* * Must be unique within the Project.
*/
function create_data_taxonomy_sample(string $formattedParent, string $dataTaxonomyId): void
{
// Create a client.
$dataTaxonomyServiceClient = new DataTaxonomyServiceClient();

// Prepare the request message.
$dataTaxonomy = new DataTaxonomy();
$request = (new CreateDataTaxonomyRequest())
->setParent($formattedParent)
->setDataTaxonomyId($dataTaxonomyId)
->setDataTaxonomy($dataTaxonomy);

// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $dataTaxonomyServiceClient->createDataTaxonomy($request);
$response->pollUntilComplete();

if ($response->operationSucceeded()) {
/** @var DataTaxonomy $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]');
$dataTaxonomyId = '[DATA_TAXONOMY_ID]';

create_data_taxonomy_sample($formattedParent, $dataTaxonomyId);
}
// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync]
Loading

0 comments on commit d99dfbd

Please sign in to comment.