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

# Update import dataset

> Update an existing import dataset.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json patch /import/datasets/{id}
openapi: 3.1.0
info:
  title: Prequel Data Import
  description: Data Import API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}
    description: Self-hosted Prequel API host
security:
  - ApiKeyAuth: []
paths:
  /import/datasets/{id}:
    patch:
      tags:
        - Import Datasets
      summary: Update import dataset
      description: Update an existing import dataset.
      operationId: update-import-dataset
      parameters:
        - name: id
          in: path
          required: true
          description: Import Dataset ID.
          schema:
            type: string
        - name: skip_validation
          in: query
          required: false
          description: Skip validation when creating or updating.
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDatasetRequest'
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: >-
                https://github.com/prequel-co/datafeed/internal/import/api/models/update-dataset-request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/GetDatasetResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/import/api/models/get-dataset-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateDatasetRequest:
      properties:
        dataset:
          $ref: '#/components/schemas/UpdateDatasetOptions'
      additionalProperties: false
      type: object
      required:
        - dataset
    GetDatasetResponse:
      properties:
        dataset:
          $ref: '#/components/schemas/DatasetResource'
      additionalProperties: false
      type: object
      required:
        - dataset
    UpdateDatasetOptions:
      properties:
        name:
          type: string
          description: Name of the dataset.
        frequency_minutes:
          type: integer
          minimum: 1
          description: Frequency in minutes for syncing this dataset.
        is_enabled:
          type: boolean
          description: Whether this dataset is enabled.
      additionalProperties: false
      type: object
    DatasetResource:
      allOf:
        - oneOf:
            - properties:
                type:
                  const: dimension
                dimension:
                  $ref: '#/components/schemas/DimensionResource'
              required:
                - type
                - dimension
              title: dimension
            - properties:
                type:
                  const: fact
                fact:
                  $ref: '#/components/schemas/FactResource'
              required:
                - type
                - fact
              title: fact
        - oneOf:
            - properties:
                method:
                  const: table
                table:
                  $ref: '#/components/schemas/TableResource'
              required:
                - method
                - table
              title: table
            - properties:
                method:
                  const: sql
                sql:
                  $ref: '#/components/schemas/SQLResource'
              required:
                - method
                - sql
              title: sql
            - properties:
                method:
                  const: glob
                glob:
                  $ref: '#/components/schemas/GlobResource'
              required:
                - method
                - glob
              title: glob
      properties:
        id:
          type: string
        name:
          type: string
        source_id:
          type: string
        is_enabled:
          type: boolean
        frequency_minutes:
          type: integer
        datalake_schema:
          type: string
        datalake_table_name:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      type: object
      required:
        - id
        - name
        - source_id
        - is_enabled
        - frequency_minutes
        - datalake_schema
        - datalake_table_name
        - created_at
        - updated_at
      unevaluatedProperties: false
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    DimensionResource:
      properties:
        primary_key_column:
          type: string
        last_modified_column:
          type: string
        is_deleted_column:
          type: string
      additionalProperties: false
      type: object
      required:
        - primary_key_column
    FactResource:
      properties:
        primary_key_column:
          type: string
        created_at_column:
          type: string
      additionalProperties: false
      type: object
      required:
        - primary_key_column
        - created_at_column
    TableResource:
      properties:
        source_table_namespace:
          type: string
        source_table_name:
          type: string
      additionalProperties: false
      type: object
      required:
        - source_table_namespace
        - source_table_name
    SQLResource:
      properties:
        query:
          type: string
      additionalProperties: false
      type: object
      required:
        - query
    GlobResource:
      properties:
        pattern:
          type: string
        format:
          type: string
      additionalProperties: false
      type: object
      required:
        - pattern
        - format
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````