Manage your Cloud SQL resources using Dataplex Universal Catalog Stay organized with collections Save and categorize content based on your preferences.
This page explains how you can search for and manage your Cloud SQLresources by using Dataplex Universal Catalog.
Dataplex Universal Catalog is a platform for storing, managing, andaccessing your metadata. Dataplex Universal Catalog retrieves thefollowing metadata from Cloud SQL instances, databases, tables,columns, and views automatically:
- Name
- Location (region)
- Creation date and last modification date
- Schema (for tables and views)
- Description
Dataplex Universal Catalog can ingest metadata at the Cloud SQL instance level even if you don't enable the integration. However, Dataplex Universal Catalog retrieves metadata from the resources belonging to the instance, such as its databases, tables, columns and views, only after you enable the integration.
Dataplex Universal Catalog retrieves metadata only from Cloud SQLprimary instances and not from read replicas.
You can use Dataplex Universal Catalog todiscover and understand your Cloud SQL metadata. UseDataplex Universal Catalog to aid with the following activities:
- Analysis, including dependencies and suitability for a use case
- Change management
- Data movement (pipelines)
- Schema evolution
With Dataplex Universal Catalog, you curate metadata by attaching aspectsto Cloud SQL metadata entries. Each aspect can have multiple metadatafields and can be based on a predefined or custom aspect type.
For example, you might attach the following aspect to a column that contains aSocial Security number, which is personally identifiable information (PII):
pii:true pii_type:SSNFor more information about Dataplex Universal Catalog, seeAbout data catalog management in Dataplex Universal Catalog.
Note: Dataplex Universal Catalog refers to the resources inCloud SQL and in other Google Cloud services asassets.In this page, we refer to Cloud SQL resources—instances,databases, tables, and views—as Cloud SQL assets. We also usethe termassets to refer to both the resources andDataplex Universal Catalog metadata for the resources.Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Dataplex API for the project.
Check permissions.
You need certain Identity and Access Management (IAM) roles and permissions to search for and attach entries to Cloud SQL assets. For details, seeRequired IAM roles and permissions for Dataplex Universal Catalog.
Required IAM roles and permissions for Dataplex Universal Catalog
Cloud SQL uses thecloudsql.schemas.view permission toprovide access to the metadata on Dataplex Universal Catalog.
To provide this permission, create a custom role that includes this permission,or use one of predefined roles that has this permission.
For more information, seePredefined Cloud SQL IAM roles.
Caution: Thecloudsql.schemas.view permission must be granted atthe project level. Users with this permission can view themetadata for all Cloud SQL instances in the project.Enable the integration of Dataplex Universal Catalog on your Cloud SQL instance
To enable the integration of Dataplex Universal Catalog on yourCloud SQL instance, use one of the following procedures.
gcloud
Create the instance
To create a Cloud SQL instance, use thegcloud sql instances create command.
gcloudsqlinstancescreateINSTANCE_NAME\--database-version=DATABASE_VERSION\--tier=MACHINE_TYPE\--region=REGION_NAME\--enable-dataplex-integration
Make the following replacements:
- INSTANCE_NAME: the name of the instance
- DATABASE_VERSION: the database version for the instance (for example,
POSTGRES_13); for a complete list of available strings, seeSqlDatabaseVersion - MACHINE_TYPE: the machine type for the instance
- REGION_NAME: the region name for the instance
Update the instance
To enable the integration for an existing instance, use thegcloud sql instances patch command.
gcloudsqlinstancespatchINSTANCE_NAME\--enable-dataplex-integrationIf you need to enable and update all the Cloud SQL instances in your project, thenyou can run a script similar to the following:
gcloudsqlinstanceslist--format="(NAME)"\|tail-n+2|xargs-t-I%gcloudsqlinstancespatch%--enable-dataplex-integration
This example is Linux-based.
REST v1
Create the instance
Use this example to create an instance with the integration enabled.For a complete list of parametersthat are available for this call, see theinstances.insert page.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
- REGION_NAME: the region name for the instance
- DATABASE_VERSION: enum string of the database version (for example,
POSTGRES_13). For a complete list of available strings, seeSqlDatabaseVersion. - PASSWORD: the password for the
rootuser - MACHINE_TYPE: enum string of the machine (tier) type, as:
db-custom-[CPUS]-[MEMORY_MBS] - EDITION_TYPE: your Cloud SQL edition
HTTP method and URL:
POST https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances
Request JSON body:
{ "name": "INSTANCE_NAME", "region": "REGION_NAME", "databaseVersion": "DATABASE_VERSION", "rootPassword": "PASSWORD", "settings": { "tier": "MACHINE_TYPE", "edition": "EDITION_TYPE", "enableDataplexIntegration": true }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-09-25T22:19:33.735Z", "operationType": "CREATE", "name": "OPERATION_ID", "targetId": "INSTANCE_ID", "selfLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}Update the instance
Use this example to update an existing instance. For a complete list of parametersthat are available for this call, see theinstances.patch page.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_NAME
Request JSON body:
{ "settings": { "enableDataplexIntegration": true }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_NAME"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_NAME" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_NAME", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-01-16T02:32:12.281Z", "operationType": "UPDATE", "name": "OPERATION_ID", "targetId": "INSTANCE_NAME", "selfLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}REST v1beta4
Create the instance
Use this example to create an instance with the integration enabled.For a complete list of parametersthat are available for this call, see theinstances.insert page.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
- REGION_NAME: the region name for the instance
- DATABASE_VERSION: enum string of the database version (for example,
POSTGRES_13). For a complete list of available strings, seeSqlDatabaseVersion. - PASSWORD: the password for the
rootuser - MACHINE_TYPE: enum string of the machine (tier) type, as:
db-custom-[CPUS]-[MEMORY_MBS] - EDITION_TYPE: your Cloud SQL edition
HTTP method and URL:
POST https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances
Request JSON body:
{ "name": "INSTANCE_NAME", "region": "REGION_NAME", "databaseVersion": "DATABASE_VERSION", "rootPassword": "PASSWORD", "settings": { "tier": "MACHINE_TYPE", "edition": "EDITION_TYPE", "enableDataplexIntegration": true }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-09-25T22:19:33.735Z", "operationType": "CREATE", "name": "OPERATION_ID", "targetId": "INSTANCE_ID", "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}Update the instance
Use this example to update an existing instance.For a complete list of parametersthat are available for this call, see theinstances.patch page.
Use this example to update an existing instance. For a complete list of parametersthat are available for this call, see the instances.patch page.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME
Request JSON body:
{ "settings": { "enableDataplexIntegration": true }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-01-16T02:32:12.281Z", "operationType": "UPDATE", "name": "OPERATION_ID", "targetId": "INSTANCE_NAME", "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}Verify Dataplex Universal Catalog integration on your Cloud SQL instance
To verify that the Dataplex Universal Catalog integration is enabled onyour instance, use one of the following procedures.
gcloud
To verify that the Dataplex Universal Catalog integration is enabledon an existing instance, use thegcloud sql instances describe command.
gcloudsqlinstancesdescribeINSTANCE_NAME
ReplaceINSTANCE_NAME with the name of the instance.In the output, look for the configuration settingenableDataplexIntegration set totrue.
REST v1
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID
- INSTANCE_ID: the instance ID
HTTP method and URL:
GET https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{"settings": { "enableDataplexIntegration": true }}REST v1beta4
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID
- INSTANCE_ID: the instance ID
HTTP method and URL:
GET https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{"settings": { "enableDataplexIntegration": true }}Deactivate the integration of Dataplex Universal Catalog on your Cloud SQL instance
To deactivate the integration of Dataplex Universal Catalog on yourCloud SQL instance, use one of the following procedures.
gcloud
To deactivate the integration for an existing instance, use thegcloud sql instances patch command.
gcloudsqlinstancespatchINSTANCE_NAME\--no-enable-dataplex-integrationIf you need to deactivate the integration and update allthe Cloud SQL instances in your project, thenyou can run a script similar to the following:
gcloudsqlinstanceslist--format="(NAME)"\|tail-n+2|xargs-t-I%gcloudsqlinstancespatch%--no-enable-dataplex-integration
This example is Linux-based.
REST v1
Use this example to deactivate the integration.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME
Request JSON body:
{ "settings": { "enableDataplexIntegration": false }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-01-16T02:32:12.281Z", "operationType": "UPDATE", "name": "OPERATION_ID", "targetId": "INSTANCE_NAME", "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}REST v1beta4
Use this example to deactivate the integration.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID orproject number of the Google Cloud project that contains the instance
- INSTANCE_NAME: the name of the instance
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME
Request JSON body:
{ "settings": { "enableDataplexIntegration": false }}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME", "status": "PENDING", "user": "user@example.com", "insertTime": "2024-01-16T02:32:12.281Z", "operationType": "UPDATE", "name": "OPERATION_ID", "targetId": "INSTANCE_NAME", "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID"}Enrich Cloud SQL assets with aspects
Aspect types are reusable resources that you can use as templates for aspects.Aspect types help you avoid duplication of work and incomplete aspects.You can use Dataplex Universal Catalog to create the aspect types thatyou need.
After you create custom aspect types, you can attach aspects to yourCloud SQL assets. Attaching aspects to Cloud SQL assetslets you do the following:
- Add business metadata to the assets
- Search for assets by business metadata and other custom metadata
To learn more about creating aspect types and attaching aspects to Cloud SQL, seeManage aspects and enrich metadata.
Search for Cloud SQL assets
Use the Dataplex Universal Catalog search page in the Google Cloud consoleto search for Cloud SQL assets.
Go to the Dataplex Universal CatalogSearch page.
InChoose search platform, selectDataplex Universal Catalog.
In theFilters panel, clickSystems, and then selectCloud SQL.
Optional. InType aliases, you can filter the search results to a specifictype of Cloud SQL asset by the selecting one or more of the followingtype alias:
- Database
- Service
- Table
- View
Use queries to perform search
You can also use the search field in Dataplex Universal Catalogto perform search queries. To view allCloud SQL assets, entersystem=Cloud_SQL.
Then you can enter specific keywords. For example, to view all Cloud SQLdatabases:
system=Cloud_SQL AND type=Database
To view all Cloud SQL tables, enter the following query:
system=Cloud_SQL AND type=Table
You can also use parentheses and the logical operatorsAND andOR forcomplex expressions. To learn more about the expressions that you can use inthe search field, seeSearch syntax for Dataplex Universal Catalog.
You can directly enter search queries for specific Cloud SQL assetsinto the search field. The format of the query string is as follows:
type="projects/dataplex-types/locations/global/entryTypes/QUERY_STRING"
ReplaceQUERY_STRING witha query string based on the Cloud SQL engine and type of asset thatyou want to query. Use the following table to identify the appropriate query string.
| Cloud SQL engine | Query strings |
|---|---|
| Cloud SQL for MySQL |
|
| Cloud SQL for PostgreSQL |
|
| Cloud SQL for SQL Server |
|
An example query might look like the following:
type="projects/dataplex-types/locations/global/entryTypes/cloudsql-postgresql-instance"
Filter Cloud SQL assets by Cloud SQL dialect
By default, Dataplex Universal Catalog displays all Cloud SQLassets. To filter the assets for Cloud SQL for MySQL, Cloud SQL for PostgreSQL,or SQL Server only, then perform the following steps.
In theAspects panel, click theAdd more aspect types menu.
SelectSQL Access.
ClickOK.
Click theplaylist_add edit aspect button. In theSQL Access page, do the following:
- In theDialect field, selectMySQL to filter for Cloud SQL for MySQL assets.
- Optional. Select theVersion field, and enter a specific version of Cloud SQL for MySQL.
ClickApply. Dataplex Universal Catalog displays onlyCloud SQL for MySQL assets.
Search by aspect type
Dataplex Universal Catalog includes a few built-in aspect types that youcan use to perform searches.
In theAspects panel, click theAdd more aspect types menu.
Optional. SelectSQL Access to filter the results by Cloud SQLdialect. For more information, see the previous procedure,Filter Cloud SQL assets by Cloud SQL dialect.
Select one or more of the following aspect types to limit the search resultsto that type.
- Cloud SQL Database
- Cloud SQL Instance
- Cloud SQL View
- Cloud SQL Schema
- Cloud SQL Table
ClickOK.
In the results table, click the name of the asset to view the metadata forthat asset.
Optional: Enhance or view your assets. You can do any of the following:
- InOverview, clickAdd to add a rich text description of the asset.
- InAspects, clickAdd to attach an aspect to the asset.
- For an instance, to view member databases, click theEntry List tab, and then clickShow all children entries in search.If theEntry List tab doesn't appear, then the instance has no databases.
- InEntry details, view the full details of the asset. Click theentry name to drill down to additional entries.
Example workflow - Drill down from instance to columns
In this example workflow, you start by searching for a Cloud SQLinstance, then view a member database, then view a table in that database, andthen view the columns in the table.
Go to the Dataplex Universal CatalogSearch page.
For theChoose search platform option, selectDataplex Universal Catalog.
In theFilters panel, selectSystems and thenCloud SQL.Alternatively, enter
system=Cloud_SQLin the search field.Select an instance name.
On theCloud SQL details page, click theEntry list tab, and then clickShow all children entries in search.Dataplex Universal Catalog displays the databases in the instance.
Note: If there is noEntry list tab, then return to theSearch pageand choose a different instance.On theCloud SQL database details page, click theEntry list tab,and then clickView child entries in search. Dataplex Universal Catalogdisplays the tables in the database.
Select a table name, and then on theCloud SQL table details page, clickSchema to view the table columns.
Optional: To add an aspect type to a column, click theAdd aspect button.
This workflow demonstrates drilling down from an instance to a table. Youcan go directly to a list of tables by enteringsystem=Cloud_SQL AND type=Tablein the search field.
Pricing
There is no charge for storing Cloud SQL technical metadata inDataplex Universal Catalog. StandardDataplex Universal Catalog pricing applies for API calls and additional businessmetadata enrichment. For more information, see theDataplex Universal Catalog pricing page.
Resource usage
Dataplex Universal Catalog extracts data from your instances periodically.The extraction process requires a certain amount of CPU usage. Instances withsmaller machine types— for example, machines that have shared cores andlarger schemas (10,000 or more tables), can utilize up to 40% of their CPU duringthe extraction process.
Limitations
This section lists limitations with using Cloud SQL andDataplex Universal Catalog.
The Dataplex Universal Catalog integration with Cloud SQLis turned off for any instance that restricts access to resourcesdue to resource enrollment inAssured Workloads.
After you enable Dataplex Universal Catalog on an instance, it can takebetween 2 to 48 hours for your Cloud SQL resources to appearin Dataplex Universal Catalog as assets, depending on the machine size,version, and type of Cloud SQL engine that you are using.
- When you drop a Cloud SQL for MySQL database, table or view and thenrecreate that database, tableor view with the previous name, all existing Dataplex Universal CatalogCatalog entries belonging to the original database,table or view remain in Dataplex Universal Catalog.When you perform the same drop and recreate operations on aCloud SQL for PostgreSQL or SQL Server database, the entries are removedfrom Dataplex Universal Catalog, which is the expected behavior.
- When you perform a
TRUNCATEoperation ona Cloud SQL for MySQL database, all Dataplex Universal Catalog entries areremoved from the database.
What's next
- About data catalog management in Dataplex Universal Catalog
- Dataplex Universal Catalog Identity and Access Management roles
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.