> ## Documentation Index
> Fetch the complete documentation index at: https://strattumai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate transforms or sync config for selected tables (T3.4, T3.7, T3.8)

> For SQL connectors (postgres, mysql): generates dbt-compatible SELECT SQL per table applying PK renaming and PII hash/drop rules. For MongoDB: generates a YAML sync config dict (returned in ``sync_config``).

PRD-005 T3.4, T3.7, T3.8



## OpenAPI

````yaml /api-reference/catalog-api.json post /connectors/generate-transforms
openapi: 3.1.0
info:
  title: Strattum Catalog API
  description: Expõe a estrutura do data lake — camadas, conectores e tabelas.
  version: 0.1.0
servers: []
security: []
paths:
  /connectors/generate-transforms:
    post:
      tags:
        - connectors
      summary: >-
        Generate transforms or sync config for selected tables (T3.4, T3.7,
        T3.8)
      description: >-
        For SQL connectors (postgres, mysql): generates dbt-compatible SELECT
        SQL per table applying PK renaming and PII hash/drop rules. For MongoDB:
        generates a YAML sync config dict (returned in ``sync_config``).


        PRD-005 T3.4, T3.7, T3.8
      operationId: generate_transforms_connectors_generate_transforms_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnifiedGenerateTransformsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTransformsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UnifiedGenerateTransformsRequest:
      properties:
        connector_type:
          type: string
          enum:
            - postgres
            - mysql
            - mongodb
          title: Connector Type
        connector_id:
          type: string
          title: Connector Id
        selected_tables:
          items:
            $ref: '#/components/schemas/TableTransformSpec'
          type: array
          title: Selected Tables
      type: object
      required:
        - connector_type
        - connector_id
        - selected_tables
      title: UnifiedGenerateTransformsRequest
    GenerateTransformsResponse:
      properties:
        transforms:
          items:
            $ref: '#/components/schemas/GeneratedTransform'
          type: array
          title: Transforms
          default: []
        sync_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sync Config
      type: object
      title: GenerateTransformsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TableTransformSpec:
      properties:
        schema:
          type: string
          title: Schema
          default: public
        table:
          type: string
          title: Table
        columns:
          items:
            $ref: '#/components/schemas/TableColumn'
          type: array
          title: Columns
        pii_overrides:
          additionalProperties:
            type: string
            enum:
              - none
              - hash
              - drop
          type: object
          title: Pii Overrides
          default: {}
      type: object
      required:
        - table
        - columns
      title: TableTransformSpec
      description: >-
        Table/collection selected for transform generation.


        Uses TableColumn (from _postgres.py) which carries pii_classification
        and

        sample_values — the same shape returned by /introspect for all connector
        types.
    GeneratedTransform:
      properties:
        name:
          type: string
          title: Name
        source:
          type: string
          title: Source
        destination:
          type: string
          title: Destination
        sql_preview:
          type: string
          title: Sql Preview
      type: object
      required:
        - name
        - source
        - destination
        - sql_preview
      title: GeneratedTransform
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TableColumn:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        is_primary_key:
          type: boolean
          title: Is Primary Key
          default: false
        pii_classification:
          type: string
          enum:
            - none
            - hash
            - drop
          title: Pii Classification
          default: none
        sample_values:
          items:
            type: string
          type: array
          title: Sample Values
          default: []
      type: object
      required:
        - name
        - type
      title: TableColumn

````