You can selectively enable or disable lineage ingestion for specific integrations at the project, folder, or organization level.
For more information about supported integrations and configuration scenarios, see Control data lineage ingestion.
Prerequisites
To control lineage ingestion, you must use the Data Lineage API. Ensure you have a client project configured for billing and quota, because the Data Lineage API is a client-based API.
Roles and permissions
To get the permissions that you need to configure and control data lineage ingestion, ask your administrator to grant you the following Identity and Access Management (IAM) roles:
To get the permissions that you need to configure and control data lineage ingestion, ask your administrator to grant you the following IAM roles on your project:
-
Configure and manage data lineage:
Data Lineage Administrator (
roles/datalineage.admin)
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to configure and control data lineage ingestion. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to configure and control data lineage ingestion:
-
Get and update lineage configurations:
-
datalineage.configs.get -
datalineage.configs.update
-
You might also be able to get these permissions with custom roles or other predefined roles.
Enable the
datalineage.googleapis.comAPI in your client project. For more information, see Enable data lineage.Set the client project. For the following examples, use the
X-Goog-User-Projectheader. For more information, see System parameters.
Get current configuration
To check whether lineage ingestion is enabled for a resource or to obtain
the etag value before you modify the configuration, retrieve the current
configuration.
C#
Before trying this sample, follow the C# setup instructions in the
Knowledge Catalog quickstart using
client libraries.
For more information, see the
Knowledge Catalog C# API
reference documentation.
To authenticate to Knowledge Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
C#
Go
Before trying this sample, follow the Go setup instructions in the
Knowledge Catalog quickstart using
client libraries.
For more information, see the
Knowledge Catalog Go API
reference documentation.
To authenticate to Knowledge Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
Go
Java
Before trying this sample, follow the Java setup instructions in the
Knowledge Catalog quickstart using
client libraries.
For more information, see the
Knowledge Catalog Java API
reference documentation.
To authenticate to Knowledge Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
Java
Python
Before trying this sample, follow the Python setup instructions in the
Knowledge Catalog quickstart using
client libraries.
For more information, see the
Knowledge Catalog Python API
reference documentation.
To authenticate to Knowledge Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
Python
gcloud
To view the current lineage configuration, use the
gcloud datalineage config describe command. You can retrieve the configuration for a project, folder, or organization.
The following example shows how to get the configuration for the current project:
gcloud datalineage config describe
For example, to get the configuration for a specific project, use the
--project flag:
gcloud datalineage config describe --project=PROJECT_ID
Replace the following:
PROJECT_ID: The ID of the project whose configuration you want to view.
To view the current lineage ingestion configuration of a service for a folder
or organization, replace --project=
with one of the following:PROJECT_ID
--folder=if you want to view the data ingestion settings for a folder.FOLDER_ID--organization=if you want to view the data ingestion settings for an organization.ORGANIZATION_ID
REST
To view the current lineage configuration, use the
projects.locations.config.get method. You can retrieve the configuration for
a project, folder, or organization.
The following example shows how to get the configuration for a project:
Before using any of the request data, make the following replacements:
CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.PROJECT_ID: The ID of the project whose configuration you want to view.
HTTP method and URL:
GET https://datalineage.googleapis.com/v1/projects/PROJECT_ID/locations/global/config
To send your request, expand one of these options:
The command returns one of the following outputs:
- If you don't provide any lineage ingestion settings, you get an output with an empty
ingestionobject:{ "name": "projects/123456789012/locations/global/config", "ingestion": {} }
This means that the service uses the default lineage ingestion setting. In this example, the lineage ingestion setting for Managed Service for Apache Spark is
enabled. - If you enable lineage ingestion explicitly, you get
the following output:
{ "name": "projects/123456789012/locations/global/config", "ingestion": { "rules": [ { "integrationSelector": { "integration": "DATAPROC" }, "lineageEnablement": { "enabled": true } } ] }, "etag": "1a2b3c4d5e" }
- If the lineage ingestion is disabled, you get the
following output:
{ "name": "projects/123456789012/locations/global/config", "ingestion": { "rules": [ { "integrationSelector": { "integration": "DATAPROC" }, "lineageEnablement": { "enabled": false } } ] }, "etag": "1a2b3c4d5e" }
To get the configuration for a folder or organization, replace
projects/ with "PROJECT_IDfolders/ or FOLDER_IDorganizations/.ORGANIZATION_ID
The etag field in the response is a checksum generated by the server based on
the current value of the configuration. When you update a configuration by
using the patch method, you can include the etag value returned from a
recent get request in the request body. If you provide the etag,
Knowledge Catalog uses it to verify that the configuration hasn't changed
since your last read request. If there's a mismatch, the update request
fails. This prevents you from unintentionally overwriting configurations made by
other users in read-modify-write scenarios. If you don't provide an etag
in your patch request, Knowledge Catalog overwrites the configuration
unconditionally.
Disable lineage ingestion for a service
To manage costs, enforce data governance policies, or exclude development projects and other workloads that don't benefit from lineage tracking, disable lineage ingestion for a service.
Java
package com.google.cloud.datacatalog.lineage.configmanagement.v1.samples;
import com.google.api.gax.rpc.NotFoundException;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.IntegrationSelector;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.LineageEnablement;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.ConfigManagementServiceClient;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.ConfigName;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.GetConfigRequest;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.UpdateConfigRequest;
public class DisableLineageIngestion {
public static void main(String[] args) throws Exception {
// TODO(developer): Replace these variables before running the sample.
String projectId = "your-project-id";
String location = "global";
disableLineageIngestion(projectId, location);
}
// Disables lineage ingestion for a specific service
// (Managed Service for Apache Spark).
public static void disableLineageIngestion(String projectId, String location) throws Exception {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests.
try (ConfigManagementServiceClient client = ConfigManagementServiceClient.create()) {
// Format the resource name.
String name = ConfigName.ofProjectLocationName(projectId, location).toString();
Config.Builder configBuilder = Config.newBuilder().setName(name);
// It is a best practice to read the existing config to preserve other rules
// and use the etag for optimistic concurrency control.
try {
GetConfigRequest getRequest = GetConfigRequest.newBuilder().setName(name).build();
Config existingConfig = client.getConfig(getRequest);
configBuilder.mergeFrom(existingConfig);
} catch (NotFoundException e) {
// If config doesn't exist, we will proceed by creating a new one.
}
// Create an integration selector for the service you want to disable.
IntegrationSelector selector =
IntegrationSelector.newBuilder().setIntegration(Integration.DATAPROC).build();
// Set lineage enablement to false to disable tracking.
LineageEnablement enablement = LineageEnablement.newBuilder().setEnabled(false).build();
// Build the ingestion rule.
IngestionRule disableRule =
IngestionRule.newBuilder()
.setIntegrationSelector(selector)
.setLineageEnablement(enablement)
.build();
// Preserve existing rules except for the one we are modifying, then add the new rule.
// We clear the ingestion block out of the configBuilder entirely to reconstruct it.
Ingestion.Builder ingestionBuilder = Ingestion.newBuilder();
if (configBuilder.hasIngestion()) {
for (IngestionRule rule : configBuilder.getIngestion().getRulesList()) {
// Keep all existing rules EXCEPT the one targeting DATAPROC
if (rule.getIntegrationSelector().getIntegration() != Integration.DATAPROC) {
ingestionBuilder.addRules(rule);
}
}
}
ingestionBuilder.addRules(disableRule);
// Update the config builder with the reconstructed ingestion settings.
configBuilder.setIngestion(ingestionBuilder.build());
// Build the update request.
UpdateConfigRequest request = UpdateConfigRequest.newBuilder()
.setConfig(configBuilder.build())
.build();
// Update the config.
Config response = client.updateConfig(request);
System.out.printf("Successfully updated config: %s\n", response.getName());
}
}
}
Python
from google.api_core.exceptions import NotFound
from google.cloud.datacatalog.lineage import configmanagement_v1
def disable_lineage_ingestion(project_id: str, location: str = "global") -> configmanagement_v1.Config:
"""Disables lineage ingestion for a specific service.
Args:
project_id: The ID of your Google Cloud project.
location: The region location, usually 'global'.
Returns:
The updated Configuration object.
"""
# Initialize client that will be used to send requests.
client = configmanagement_v1.ConfigManagementServiceClient()
# The config name format
name = f"projects/{project_id}/locations/{location}/config"
try:
# Retrieve the existing config to preserve other configurations and
# obtain the latest etag for optimistic concurrency control.
config = client.get_config(name=name)
# Filter out existing rules for the integration we are updating
new_rules = [
rule for rule in config.ingestion.rules
if rule.integration_selector.integration != configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration.DATAPROC
]
except NotFound:
# If the config does not exist, start fresh
config = configmanagement_v1.Config(name=name)
new_rules = []
# Define the integration to disable tracking for (e.g., DATAPROC).
integration_selector = configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector(
integration=configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration.DATAPROC
)
# Set lineage enablement to False to disable tracking.
lineage_enablement = configmanagement_v1.Config.Ingestion.IngestionRule.LineageEnablement(
enabled=False
)
# Create the ingestion rule.
disable_rule = configmanagement_v1.Config.Ingestion.IngestionRule(
integration_selector=integration_selector,
lineage_enablement=lineage_enablement,
)
# Append the new disabling rule and assign it back to the config ingestion rules
new_rules.append(disable_rule)
config.ingestion = configmanagement_v1.Config.Ingestion(rules=new_rules)
# Create the update request using the config (which includes the etag if it existed).
request = configmanagement_v1.UpdateConfigRequest(
config=config,
)
# Make the request to update the config
response = client.update_config(request=request)
print(f"Successfully updated config: {response.name}")
return response
gcloud
To disable lineage ingestion for a specific service,
use the gcloud datalineage config update command with an inline JSON string or a path to a JSON file that sets lineageEnablement.enabled to false for the specific integration.
The following example shows how to disable lineage ingestion of a service for a project using an inline JSON string:
gcloud datalineage config update --project=PROJECT_ID \
--config='{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": false
}
}
]
},
"etag": "ETAG"
}'
Replace the following:
PROJECT_ID: The ID of the project whose configuration you want to update.INTEGRATION: The integration you set the configuration for. For example,DATAPROCorBIGQUERY.ETAG: Theetagvalue returned from a recentgetrequest in the request body, used to verify that the configuration hasn't changed since your last read request.
To update the configuration using a JSON file, run:
gcloud datalineage config update --project=PROJECT_ID --config=CONFIG_FILE
Replace the following:
CONFIG_FILE: The path to the JSON file containing the configuration.
To disable lineage ingestion of a service for a folder or organization, replace
--project= with one of the
following:PROJECT_ID
--folder=if you want to update the data ingestion settings for a folder.FOLDER_ID--organization=if you want to update the data ingestion settings for an organization.ORGANIZATION_ID
REST
To disable lineage ingestion for a specific service,
use the projects.locations.config.patch method with an ingestion rule that
sets lineageEnablement.enabled to false for the specific integration.
To prevent unintentionally overwriting configurations made by other users in
read-modify-write scenarios, you can include the etag field in the request
body. For more information, see
Get current configuration.
Before using any of the request data, make the following replacements:
CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.PROJECT_ID: The ID of the project whose configuration you want to update.ETAG: Theetagvalue returned from a recentgetrequest.INTEGRATION: Theintegrationyou set the configuration for. For example,DATAPROC.
HTTP method and URL:
PATCH https://datalineage.googleapis.com/v1/projects/PROJECT_ID/locations/global/config
Request JSON body:
{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": false
}
}
]
},
"etag": "ETAG"
}
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{
"name": "projects/PROJECT_ID/locations/global/config",
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": false
}
}
]
},
"etag": "1a2b3c4d5e"
}
To disable the lineage ingestion for a folder or organization, replace
projects/ with "PROJECT_IDfolders/ or FOLDER_IDorganizations/.ORGANIZATION_ID
Enable lineage ingestion for a service
To resume tracking after disabling it, or to enable an integration that is disabled by default, enable lineage ingestion for a service.
Java
package com.google.cloud.datacatalog.lineage.configmanagement.v1.samples;
import com.google.api.gax.rpc.NotFoundException;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.IntegrationSelector;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.Config.Ingestion.IngestionRule.LineageEnablement;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.ConfigManagementServiceClient;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.ConfigName;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.GetConfigRequest;
import com.google.cloud.datacatalog.lineage.configmanagement.v1.UpdateConfigRequest;
public class EnableLineageIngestion {
public static void main(String[] args) throws Exception {
// TODO(developer): Replace these variables before running the sample.
String projectId = "your-project-id";
String location = "global";
enableLineageIngestion(projectId, location);
}
// Enables lineage ingestion for a specific service
// (Managed Service for Apache Spark).
public static void enableLineageIngestion(String projectId, String location) throws Exception {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests.
try (ConfigManagementServiceClient client = ConfigManagementServiceClient.create()) {
// Format the resource name.
String name = ConfigName.ofProjectLocationName(projectId, location).toString();
Config.Builder configBuilder = Config.newBuilder().setName(name);
// It is a best practice to read the existing config to preserve other rules
// and use the etag for optimistic concurrency control.
try {
GetConfigRequest getRequest = GetConfigRequest.newBuilder().setName(name).build();
Config existingConfig = client.getConfig(getRequest);
configBuilder.mergeFrom(existingConfig);
} catch (NotFoundException e) {
// If config doesn't exist, we will proceed by creating a new one.
}
// Create an integration selector for the service you want to enable (e.g., DATAPROC).
IntegrationSelector selector =
IntegrationSelector.newBuilder().setIntegration(Integration.DATAPROC).build();
// Set lineage enablement to true to enable tracking.
LineageEnablement enablement = LineageEnablement.newBuilder().setEnabled(true).build();
// Build the ingestion rule.
IngestionRule enableRule =
IngestionRule.newBuilder()
.setIntegrationSelector(selector)
.setLineageEnablement(enablement)
.build();
// Preserve existing rules except for the one we are modifying, then add the new rule.
// We clear the ingestion block out of the configBuilder entirely to reconstruct it.
Ingestion.Builder ingestionBuilder = Ingestion.newBuilder();
if (configBuilder.hasIngestion()) {
for (IngestionRule rule : configBuilder.getIngestion().getRulesList()) {
// Keep all existing rules EXCEPT the one targeting DATAPROC
if (rule.getIntegrationSelector().getIntegration() != Integration.DATAPROC) {
ingestionBuilder.addRules(rule);
}
}
}
ingestionBuilder.addRules(enableRule);
// Update the config builder with the reconstructed ingestion settings.
configBuilder.setIngestion(ingestionBuilder.build());
// Build the update request.
UpdateConfigRequest request = UpdateConfigRequest.newBuilder()
.setConfig(configBuilder.build())
.build();
// Update the config.
Config response = client.updateConfig(request);
System.out.printf("Successfully updated config: %s\n", response.getName());
}
}
}
Python
from google.api_core.exceptions import NotFound
from google.cloud.datacatalog.lineage import configmanagement_v1
def enable_lineage_ingestion(project_id: str, location: str = "global") -> configmanagement_v1.Config:
"""Enables lineage ingestion for a specific service like Dataproc
(Managed Service for Apache Spark).
Args:
project_id: The ID of your Google Cloud project.
location: The region location, usually 'global'.
Returns:
The updated Configuration object.
"""
# Initialize client that will be used to send requests.
client = configmanagement_v1.ConfigManagementServiceClient()
# The config name format
name = f"projects/{project_id}/locations/{location}/config"
try:
# Retrieve the existing config to preserve other configurations and
# obtain the latest etag for optimistic concurrency control.
config = client.get_config(name=name)
# Filter out existing rules for the integration we are updating
new_rules = [
rule for rule in config.ingestion.rules
if rule.integration_selector.integration != configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration.DATAPROC
]
except NotFound:
# If the config does not exist, start fresh
config = configmanagement_v1.Config(name=name)
new_rules = []
# Define the integration to enable tracking for (e.g., DATAPROC).
integration_selector = configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector(
integration=configmanagement_v1.Config.Ingestion.IngestionRule.IntegrationSelector.Integration.DATAPROC
)
# Set lineage enablement to True to enable tracking.
lineage_enablement = configmanagement_v1.Config.Ingestion.IngestionRule.LineageEnablement(
enabled=True
)
# Create the ingestion rule.
enable_rule = configmanagement_v1.Config.Ingestion.IngestionRule(
integration_selector=integration_selector,
lineage_enablement=lineage_enablement,
)
# Append the new enabling rule and assign it back to the config ingestion rules
new_rules.append(enable_rule)
config.ingestion = configmanagement_v1.Config.Ingestion(rules=new_rules)
# Create the update request using the config (which includes the etag if it existed).
request = configmanagement_v1.UpdateConfigRequest(
config=config,
)
# Make the request to update the config
response = client.update_config(request=request)
print(f"Successfully updated config: {response.name}")
return response
gcloud
To enable lineage ingestion for a specific service,
use the gcloud datalineage config update command with an inline JSON string or a path to a JSON file that sets lineageEnablement.enabled to true for the specific integration. Current integrations include Managed Service for Apache Spark, BigQuery, and Managed Airflow.
The following example shows how to enable lineage ingestion of a service for a project using an inline JSON string:
gcloud datalineage config update --project=PROJECT_ID \
--config='{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "ETAG"
}'
Replace the following:
PROJECT_ID: The ID of the project whose configuration you want to update.INTEGRATION: The integration you set the configuration for (for example,DATAPROCorBIGQUERY).ETAG: Theetagvalue returned from a recentgetrequest in the request body, used to verify that the configuration hasn't changed since your last read request.
To update the configuration using a JSON file, run:
gcloud datalineage config update --project=PROJECT_ID --config=CONFIG_FILE
Replace the following:
CONFIG_FILE: The path to the JSON file containing the configuration.
To enable lineage ingestion of a service for a folder or organization, replace
--project= with one of the
following:PROJECT_ID
--folder=if you want to update the data ingestion settings for a folder.FOLDER_ID--organization=if you want to update the data ingestion settings for an organization.ORGANIZATION_ID
REST
To enable lineage ingestion for a specific service,
use the projects.locations.config.patch method with an ingestion rule that
sets lineageEnablement.enabled to true for the specific integration.
To prevent unintentionally overwriting configurations made by other users in
read-modify-write scenarios, you can include the etag field in the request
body. For more information, see
Get current configuration.
Before using any of the request data, make the following replacements:
CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.PROJECT_ID: The ID of the project whose configuration you want to update.ETAG: Theetagvalue returned from a recentgetrequest.INTEGRATION: Theintegrationyou set the configuration for. For example,DATAPROC.
HTTP method and URL:
PATCH https://datalineage.googleapis.com/v1/projects/PROJECT_ID/locations/global/config
Request JSON body:
{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "ETAG"
}
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{
"name": "projects/PROJECT_ID/locations/global/config",
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "INTEGRATION"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "1a2b3c4d5e"
}
To enable lineage ingestion of a service for a folder or organization, replace
projects/ with PROJECT_IDfolders/ or
FOLDER_IDorganizations/.ORGANIZATION_ID
Configure lineage ingestion for several services
To configure lineage ingestion for several integrations simultaneously, use the projects.locations.config.patch, folders.locations.config.patch, or organizations.locations.config.patch methods. You can update the configuration at the project, folder, or organization level by defining multiple rules in the request body. For more information, see How data ingestion configuration works for multi-service integrations.
Organization level
Configure the organization to Enable lineage ingestion for Managed Service for Apache Spark:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-H "X-Goog-User-Project: CLIENT_PROJECT_ID" \
"https://datalineage.googleapis.com/v1/organizations/ORGANIZATION_ID/locations/global/config" \
-d '{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "DATAPROC"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "ORGANIZATION_CONFIG_ETAG"
}'
Replace the following:
ORGANIZATION_ID: The ID of the organization whose configuration you want to update.CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.ORGANIZATION_CONFIG_ETAG: Theetagvalue returned from a recentgetrequest for the organization configuration.
Folder level
Configure the folder to Enable lineage ingestion for BigQuery:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-H "X-Goog-User-Project: CLIENT_PROJECT_ID" \
"https://datalineage.googleapis.com/v1/folders/FOLDER_ID/locations/global/config" \
-d '{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "BIGQUERY"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "FOLDER_CONFIG_ETAG"
}'
Replace the following:
FOLDER_ID: The ID of the folder whose configuration you want to update.CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.FOLDER_CONFIG_ETAG: Theetagvalue returned from a recentgetrequest for the folder's configuration.
Project level
Configure the project to Disable lineage ingestion for BigQuery and Enable lineage ingestion for Managed Service for Apache Airflow simultaneously:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-H "X-Goog-User-Project: CLIENT_PROJECT_ID" \
"https://datalineage.googleapis.com/v1/projects/PROJECT_ID/locations/global/config" \
-d '{
"ingestion": {
"rules": [
{
"integrationSelector": {
"integration": "BIGQUERY"
},
"lineageEnablement": {
"enabled": false
}
},
{
"integrationSelector": {
"integration": "MANAGED_AIRFLOW"
},
"lineageEnablement": {
"enabled": true
}
}
]
},
"etag": "PROJECT_CONFIG_ETAG"
}'
Replace the following:
PROJECT_ID: The ID of the project whose configuration you want to update.CLIENT_PROJECT_ID: The ID of your client project used for billing or quotas.PROJECT_CONFIG_ETAG: Theetagvalue returned from a recentgetrequest for the project's configuration.
What's next
- Learn about controlling data lineage ingestion.
- Learn how to view lineage information.