Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Libraries are available on GitHub and Maven Central for developing Java applicat
| [Container Analysis](https://github.com/googleapis/google-cloud-java/tree/main/java-containeranalysis) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-containeranalysis.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-containeranalysis&core=gav) |
| [Controls Partner API](https://github.com/googleapis/google-cloud-java/tree/main/java-cloudcontrolspartner) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-cloudcontrolspartner.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-cloudcontrolspartner&core=gav) |
| [DNS](https://github.com/googleapis/google-cloud-java/tree/main/java-dns) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dns.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dns&core=gav) |
| [Data Catalog](https://github.com/googleapis/google-cloud-java/tree/main/java-datacatalog) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datacatalog.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datacatalog&core=gav) |
| [Data Fusion](https://github.com/googleapis/google-cloud-java/tree/main/java-data-fusion) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-data-fusion.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-data-fusion&core=gav) |
| [Data Lineage](https://github.com/googleapis/google-cloud-java/tree/main/java-datalineage) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datalineage.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datalineage&core=gav) |
| [Data Loss Prevention](https://github.com/googleapis/google-cloud-java/tree/main/java-dlp) | [![stable][stable-stability]][stable-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dlp.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dlp&core=gav) |
Expand Down
7 changes: 0 additions & 7 deletions gapic-libraries-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datacatalog-bom</artifactId>
<version>1.102.0</version><!-- {x-version-update:google-cloud-datacatalog:current} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dataflow-bom</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions java-bigquery/google-cloud-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@
<classifier>testlib</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datacatalog</artifactId>
<scope>test</scope>
<version>1.102.0</version><!-- {x-version-update:google-cloud-datacatalog:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigqueryconnection</artifactId>
Expand Down Expand Up @@ -194,18 +188,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datacatalog</artifactId>
<scope>test</scope>
<version>1.102.0</version><!-- {x-version-update:google-cloud-datacatalog:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-datacatalog-v1</artifactId>
<scope>test</scope>
<version>1.102.0</version><!-- {x-version-update:proto-google-cloud-datacatalog-v1:current} -->
</dependency>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
import com.google.cloud.bigquery.ModelInfo;
import com.google.cloud.bigquery.Parameter;
import com.google.cloud.bigquery.ParquetOptions;
import com.google.cloud.bigquery.PolicyTags;
import com.google.cloud.bigquery.PrimaryKey;
import com.google.cloud.bigquery.QueryJobConfiguration;
import com.google.cloud.bigquery.QueryJobConfiguration.JobCreationMode;
Expand Down Expand Up @@ -145,12 +144,6 @@
import com.google.cloud.bigquery.ViewDefinition;
import com.google.cloud.bigquery.WriteChannelConfiguration;
import com.google.cloud.bigquery.testing.RemoteBigQueryHelper;
import com.google.cloud.datacatalog.v1.CreatePolicyTagRequest;
import com.google.cloud.datacatalog.v1.CreateTaxonomyRequest;
import com.google.cloud.datacatalog.v1.PolicyTag;
import com.google.cloud.datacatalog.v1.PolicyTagManagerClient;
import com.google.cloud.datacatalog.v1.Taxonomy;
import com.google.cloud.datacatalog.v1.Taxonomy.PolicyType;
import com.google.cloud.storage.BlobInfo;
import com.google.cloud.storage.BucketInfo;
import com.google.cloud.storage.Storage;
Expand Down Expand Up @@ -2147,99 +2140,6 @@ void testCreateTableWithDefaultValueExpression() {
bigquery.delete(tableId);
}

@Test
void testCreateAndUpdateTableWithPolicyTags() throws IOException {
// Set up policy tags in the datacatalog service
try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
CreateTaxonomyRequest createTaxonomyRequest =
CreateTaxonomyRequest.newBuilder()
.setParent(String.format("projects/%s/locations/%s", PROJECT_ID, "us"))
.setTaxonomy(
Taxonomy.newBuilder()
// DisplayName must be unique across org. Use UUID rather than time to ensure
// no collisions
// from parallel test invocations
.setDisplayName(
String.format(
"testing taxonomy %s", UUID.randomUUID().toString().substring(0, 8)))
.setDescription("taxonomy created for integration tests")
.addActivatedPolicyTypes(PolicyType.FINE_GRAINED_ACCESS_CONTROL)
.build())
.build();
Taxonomy taxonomyResponse = policyTagManagerClient.createTaxonomy(createTaxonomyRequest);
String taxonomyId = taxonomyResponse.getName();

CreatePolicyTagRequest createPolicyTagRequest =
CreatePolicyTagRequest.newBuilder()
.setParent(taxonomyId)
.setPolicyTag(PolicyTag.newBuilder().setDisplayName("ExamplePolicyTag").build())
.build();
PolicyTag policyTagResponse = policyTagManagerClient.createPolicyTag(createPolicyTagRequest);
String policyTagId = policyTagResponse.getName();
PolicyTags policyTags =
PolicyTags.newBuilder().setNames(ImmutableList.of(policyTagId)).build();
Field stringFieldWithPolicy =
Field.newBuilder("StringFieldWithPolicy", LegacySQLTypeName.STRING)
.setMode(Field.Mode.NULLABLE)
.setDescription("field has a policy")
.setPolicyTags(policyTags)
.build();
Schema policySchema =
Schema.of(STRING_FIELD_SCHEMA, stringFieldWithPolicy, INTEGER_FIELD_SCHEMA);

String policyDatasetName = "policyset_" + UUID.randomUUID().toString().replace("-", "_");
globalBigQuery.create(DatasetInfo.newBuilder(policyDatasetName).setLocation("US").build());
try {
// Test: Amend an existing schema with a policy tag.
String tableNameForUpdate = "test_update_table_policytags";
TableId tableIdForUpdate = TableId.of(policyDatasetName, tableNameForUpdate);
TableInfo tableInfo =
TableInfo.newBuilder(tableIdForUpdate, StandardTableDefinition.of(TABLE_SCHEMA))
.setDescription("policy tag update test table")
.build();
Table createdTableForUpdate = globalBigQuery.create(tableInfo);
assertNotNull(createdTableForUpdate);
Schema schema = createdTableForUpdate.getDefinition().getSchema();
FieldList fields = schema.getFields();
// Create a new schema adding the current fields, plus the new policy tag field
List<Field> fieldList = new ArrayList<>();
for (Field field : fields) {
fieldList.add(field);
}
fieldList.add(stringFieldWithPolicy);
Schema updatedSchemaWithPolicyTag = Schema.of(fieldList);
Table updatedTable =
createdTableForUpdate.toBuilder()
.setDefinition(StandardTableDefinition.of(updatedSchemaWithPolicyTag))
.build();
updatedTable.update();
Table remoteUpdatedTable = globalBigQuery.getTable(policyDatasetName, tableNameForUpdate);
assertEquals(
updatedSchemaWithPolicyTag,
remoteUpdatedTable.<StandardTableDefinition>getDefinition().getSchema());
globalBigQuery.delete(tableIdForUpdate);

// Test: Create a new table with a policy tag defined.
String tableName = "test_create_table_policytags";
TableId tableId = TableId.of(policyDatasetName, tableName);
StandardTableDefinition tableDefinition =
StandardTableDefinition.newBuilder().setSchema(policySchema).build();
Table createdTable = globalBigQuery.create(TableInfo.of(tableId, tableDefinition));
assertNotNull(createdTable);
Table remoteTable = globalBigQuery.getTable(policyDatasetName, tableName);
assertEquals(
policySchema, remoteTable.<StandardTableDefinition>getDefinition().getSchema());
globalBigQuery.delete(tableId);
} finally {
RemoteBigQueryHelper.forceDelete(globalBigQuery, policyDatasetName);
}

// Clean up policy tags
policyTagManagerClient.deletePolicyTag(policyTagId);
policyTagManagerClient.deleteTaxonomy(taxonomyId);
}
}

@Test
void testCreateAndGetTable() {
String tableName = "test_create_and_get_table";
Expand Down
1 change: 0 additions & 1 deletion java-cloud-bom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ This is the table of modules included in the latest libraries-bom release:
| google-cloud-core | Runtime | [2.73.0](https://cloud.google.com/java/docs/reference/google-cloud-core/latest/overview) | [Google Cloud Core](n/a) |
| google-cloud-data-fusion | Product | [1.95.0](https://cloud.google.com/java/docs/reference/google-cloud-data-fusion/latest/overview) | [Cloud Data Fusion](https://cloud.google.com/data-fusion/docs) |
| google-cloud-databasecenter | Product | [0.16.0](https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview) | N/A |
| google-cloud-datacatalog | Product | [1.101.0](https://cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/overview) | [Data Catalog](https://cloud.google.com/data-catalog) |
| google-cloud-dataflow | Product | [0.99.0](https://cloud.google.com/java/docs/reference/google-cloud-dataflow/latest/overview) | [Dataflow](https://cloud.google.com/dataflow/docs) |
| google-cloud-dataform | Product | [0.94.0](https://cloud.google.com/java/docs/reference/google-cloud-dataform/latest/overview) | [Cloud Dataform](https://cloud.google.com/dataform/docs) |
| google-cloud-datalabeling | Product | [0.215.0](https://cloud.google.com/java/docs/reference/google-cloud-datalabeling/latest/overview) | [Data Labeling](https://cloud.google.com/ai-platform/data-labeling/docs/) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ google-cloud-contentwarehouse: https://cloud.google.com/document-warehouse/docs/
Document AI Warehouse
google-cloud-core: n/a, Google Cloud Core
google-cloud-data-fusion: https://cloud.google.com/data-fusion/docs, Cloud Data Fusion
google-cloud-datacatalog: https://cloud.google.com/data-catalog, Data Catalog
google-cloud-dataflow: https://cloud.google.com/dataflow/docs, Dataflow
google-cloud-dataform: https://cloud.google.com/dataform/docs, Cloud Dataform
google-cloud-datalabeling: https://cloud.google.com/ai-platform/data-labeling/docs/,
Expand Down
4 changes: 0 additions & 4 deletions java-cloud-bom/tests/dependency-convergence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@
<artifactId>google-cloud-data-fusion</artifactId>
<groupId>com.google.cloud</groupId>
</dependency>
<dependency>
<artifactId>google-cloud-datacatalog</artifactId>
<groupId>com.google.cloud</groupId>
</dependency>
<dependency>
<artifactId>google-cloud-datalabeling</artifactId>
<groupId>com.google.cloud</groupId>
Expand Down
13 changes: 0 additions & 13 deletions java-datacatalog/.cloud/main.tf

This file was deleted.

7 changes: 0 additions & 7 deletions java-datacatalog/.cloud/variables.tf

This file was deleted.

15 changes: 0 additions & 15 deletions java-datacatalog/.repo-metadata.json

This file was deleted.

Loading
Loading