Get JDBC Allowed Datatypes

Get allowed datatypes for JDBC incremental columns

Overview

Retrieve the list of allowed data types for incremental columns per database plugin. This is useful when configuring JDBC jobs with incremental sync to ensure the selected column type is supported.

Examples

Get Allowed Datatypes

GET /platform/jobs/jdbc/configs/allowed_datatypes

Response (200 OK):

{
  "status": true,
  "data": {
    "postgresql": [
      "timestamp with time zone",
      "timestamp without time zone",
      "date",
      "integer",
      "bigint",
      "smallint",
      "serial",
      "bigserial"
    ],
    "mysql": [
      "datetime",
      "timestamp",
      "date",
      "int",
      "bigint",
      "smallint",
      "mediumint",
      "tinyint"
    ],
    "oracle": [
      "TIMESTAMP",
      "TIMESTAMP WITH TIME ZONE",
      "TIMESTAMP WITH LOCAL TIME ZONE",
      "DATE",
      "NUMBER"
    ],
    "sqlserver": [
      "datetime",
      "datetime2",
      "smalldatetime",
      "date",
      "int",
      "bigint",
      "smallint",
      "tinyint"
    ]
  }
}

Python Example

import requests

BASE_URL = "https://maestro.dadosfera.ai"

# Get allowed datatypes
response = requests.get(
    f"{BASE_URL}/platform/jobs/jdbc/configs/allowed_datatypes",
    headers=headers
)

datatypes = response.json()['data']

# Check if a column type is valid for PostgreSQL
plugin = "postgresql"
column_type = "timestamp with time zone"

if column_type in datatypes.get(plugin, []):
    print(f"'{column_type}' is valid for {plugin}")
else:
    print(f"'{column_type}' is NOT valid for {plugin}")
    print(f"Valid types: {datatypes[plugin]}")

Supported Databases

PostgreSQL

Data TypeCategory
timestamp with time zoneTimestamp
timestamp without time zoneTimestamp
dateDate
integerNumeric
bigintNumeric
smallintNumeric
serialAuto-increment
bigserialAuto-increment

MySQL

Data TypeCategory
datetimeTimestamp
timestampTimestamp
dateDate
intNumeric
bigintNumeric
smallintNumeric
mediumintNumeric
tinyintNumeric

Oracle

Data TypeCategory
TIMESTAMPTimestamp
TIMESTAMP WITH TIME ZONETimestamp
TIMESTAMP WITH LOCAL TIME ZONETimestamp
DATEDate
NUMBERNumeric

SQL Server

Data TypeCategory
datetimeTimestamp
datetime2Timestamp
smalldatetimeTimestamp
dateDate
intNumeric
bigintNumeric
smallintNumeric
tinyintNumeric

Choosing an Incremental Column

Best Practices

  1. Prefer timestamps over dates - More precision for tracking changes
  2. Use auto-updating columns - Columns like updated_at that update on every change
  3. Avoid manually maintained columns - Risk of missed updates
  4. Consider timezone awareness - Use timestamp with time zone when possible

Good Incremental Columns

ColumnTypeWhy
updated_attimestampAuto-updated on changes
modified_datedatetimeTracks modification time
version_numberintegerAuto-incrementing version

Bad Incremental Columns

ColumnTypeWhy
created_attimestampOnly set once, misses updates
statusvarcharNot sortable/comparable
idintegerOnly catches new rows, not updates

Notes

  • Data types are case-sensitive for Oracle
  • When using POST /platform/jobs/jdbc/:jobId/sync-mode, the incremental_column_type must match one of these values
  • For incremental_with_qualify mode, also specify primary_keys for deduplication
Language
Credentials
Header
Click Try It! to start a request and see the response here!