---
schema_version: "1"
id: 53b9feff98b7e33adde36e4a35c1c2f3182aa89c0fb2b020052e273b85d45553
title: Supported Validations for DBT Segments
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/connectapi_features_cdp_dbt_validations.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_features_cdp_dbt_validations.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a7a73c8a1461c14e93f750f6107bcd7ec7b15dd5fb01bf3d8f35eefe24f5a3fc
description: When creating or updating a segment, the ConnectApi.CdpSegmentInput class is subject to some SQL validations.
---
# Supported Validations for DBT Segments

When creating or updating a segment, the ConnectApi.CdpSegmentInput class is subject to some SQL validations.

You can create a segment using the [createSegment(input)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_CdpSegment_static_methods.htm#apex_ConnectAPI_CdpSegment_createSegment_4 "HTML (New Window)") method with the ConnectApi.CdpSegmentInput class. Similarly, you can update a segment using the [updateSegment(segmentApiName, input)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_CdpSegment_static_methods.htm#apex_ConnectAPI_CdpSegment_updateSegment_4 "HTML (New Window)") method with the same input class. The [ConnectApi.CdpSegmentDbtModelInput](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_connectapi_input_cdp_segment_dbt_model.htm "HTML (New Window)") input class, which is nested in the ConnectApi.CdpSegmentInput class, provides validation for the SQL.

The sql property of the ConnectApi.CdpSegmentDbtModelInput is subject to these validations.