> ## 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.

# Preview dos dados de uma tabela

> Retorna as primeiras linhas de uma tabela/modelo do data lake.

- **Raw**: `layer=raw&connector=google_drive&table=documents`
- **Clean**: `layer=clean&table=dim_clientes`



## OpenAPI

````yaml /api-reference/catalog-api.json get /catalog/preview
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:
  /catalog/preview:
    get:
      tags:
        - catalog
      summary: Preview dos dados de uma tabela
      description: |-
        Retorna as primeiras linhas de uma tabela/modelo do data lake.

        - **Raw**: `layer=raw&connector=google_drive&table=documents`
        - **Clean**: `layer=clean&table=dim_clientes`
      operationId: get_preview_catalog_preview_get
      parameters:
        - name: layer
          in: query
          required: true
          schema:
            type: string
            pattern: ^(raw|clean|enrichment)$
            description: 'Camada: raw, clean ou enrichment'
            title: Layer
          description: 'Camada: raw, clean ou enrichment'
        - name: table
          in: query
          required: true
          schema:
            type: string
            description: Nome da tabela ou modelo
            title: Table
          description: Nome da tabela ou modelo
        - name: connector
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Conector (obrigatório para layer=raw)
            title: Connector
          description: Conector (obrigatório para layer=raw)
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Full-text search (ILIKE) across all columns
            title: Q
          description: Full-text search (ILIKE) across all columns
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Column to sort by (whitelisted against schema)
            title: Sort By
          description: Column to sort by (whitelisted against schema)
        - name: sort_dir
          in: query
          required: false
          schema:
            type: string
            pattern: ^(asc|desc|ASC|DESC)$
            default: asc
            title: Sort Dir
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 5000
            minimum: 1
            default: 500
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TablePreview'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TablePreview:
      properties:
        columns:
          items:
            type: string
          type: array
          title: Columns
        rows:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Rows
        total_rows:
          type: integer
          title: Total Rows
        file:
          type: string
          title: File
        schema:
          items:
            $ref: '#/components/schemas/SchemaField'
          type: array
          title: Schema
          default: []
      type: object
      required:
        - columns
        - rows
        - total_rows
        - file
      title: TablePreview
      description: Preview dos dados de uma tabela/modelo.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SchemaField:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - name
        - type
      title: SchemaField
    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

````