Skip to main content
Version: Next

Table Config

CollectorTableConfig​

FieldTypeDescription
configIdstrUnique key. Auto-generated.
namestrconfig name.
modelNamestrIt belongs to which model.
objectKeystrBusiness key column
tableNamestrTable of extraction
primaryKeylistprimary key of the extracted table.
parentNamestrname of parent configuration.
joinKeyslistAssociated field between parent and child tables.
dependOnlistUsed for root table. When JSON is pushed to raw topic, determine its dependencies.
conditionslistSet conditions to filter data during extraction
labelstrNode name in JSON
isListboolIs list or not.
dataSourceIdstrThen configuration of source db which data will be extracted.
auditColumnstrAudit column for CDC query
triggeredboolEnable the current configuration.
tenantIdstrTenant id. Auto-generated by system when created.
createdAtdatetimeAudit column. Auto-generated.
createdBystrAudit column. Auto-generated.
lastModifiedAtdatetimeAudit column. Auto-generated.
lastModifiedBystrAudit column. Auto-generated.
versionintOptimistic locking. Auto-generated.

API​

create or update table config:

APIDescriptionMethodRequestResponse
/collector/table/configcreate table configurationPOSTCollectorTableConfigCollectorTableConfig

For Example​

1. Create configuration of table "t_party", it is the root table of "party" model:​

request:

{
"name": "t_party",
"modelName": "party",
"objectKey": "party_id",
"tableName": "t_party",
"primaryKey": [
"party_id"
],
"dataSourceId": "1076175258178714624",
"auditColumn": "update_timestamp",
"isList": false,
"triggered": true
}

response:

{
"configId": "1077188883923622884",
"name": "t_party",
"modelName": "party",
"objectKey": "party_id",
"tableName": "t_party",
"primaryKey": [
"party_id"
],
"dataSourceId": "1076175258178714624",
"auditColumn": "update_timestamp",
"isList": false,
"triggered": true,
"tenantId": "1",
"createdAt": "2023-02-20T11:20:03",
"createdBy": "2",
"lastModifiedAt": "2023-02-20T11:20:03",
"lastModifiedBy": "2",
"version": 1
}

2. Create configuration of table "t_customer", it is child of table "t_party":​

request:

{
"name": "t_customer",
"modelName": "party",
"objectKey": "party_id",
"tableName": "t_customer",
"primaryKey": [
"customer_id"
],
"parentName": "t_party",
"joinKeys": [
{
"childKey": "customer_id",
"parentKey": "party_id"
}
],
"label": "customer",
"auditColumn": "update_timestamp",
"dataSourceId": "1077240721411228672",
"isList": false,
"triggered": true
}

response:

{
"configId": "1077188883923623936",
"name": "t_customer",
"modelName": "party",
"objectKey": "party_id",
"tableName": "t_customer",
"parentName": "t_party",
"joinKeys": [
{
"childKey": "customer_id",
"parentKey": "party_id"
}
],
"primaryKey": [
"customer_id"
],
"label": "customer",
"auditColumn": "update_timestamp",
"dataSourceId": "1077240721411228672",
"isList": false,
"triggered": true,
"tenantId": "1",
"createdAt": "2023-02-20T11:24:03",
"createdBy": "2",
"lastModifiedAt": "2023-02-20T11:24:03",
"lastModifiedBy": "2",
"version": 1
}