Imports data from a database or datatabases to an address table.
This request imports data from a Comma Separated Values file and a dBASE or FoxPro file.
The reply provides information about the records processed.
{
"$schema":"http://json-schema.org/draft-04/schema#",
"description":"Imports data into an address table.",
"type":"object",
"required":[
"addressTable",
"sources",
"fieldMappings"
],
"properties":{
"addressTable":{
"title":"Address Table",
"description":"Resource item identifying the address table.",
"type":"string",
"pattern":"(?i)^([0-9]{10}|name\\$.+|file\\$[a-z]+)$"
},
"overwrite":{
"title":"Overwrite",
"description":"Indicates whether or not to overwrite existing records in the address table.",
"default":false,
"type":"boolean"
},
"sources":{
"title":"Sources",
"description":"List of source tables to import from.",
"type":"array",
"items":{
"type":"object",
"required":[
"classId",
"connection"
],
"properties":{
"classId":{
"title":"Class ID",
"description":"Database class ID.",
"type":"string",
"enum":[
"csv",
"dbf",
"fixed",
"delimited"
],
"enumValues":[
{
"value":"csv",
"displayValue":"Comma Separated Values",
"description":"Comma Separated Values file, as defined in RFC 4180, with ANSI encoding."
},
{
"value":"dbf",
"displayValue":"dBASE/FoxPro",
"description":"dBASE or FoxPro table."
},
{
"value":"fixed",
"displayValue":"Fixed Length",
"description":"Fixed length text file, with ANSI encoding."
},
{
"value":"delimited",
"displayValue":"Delimited",
"description":"Delimited text file, with ANSI encoding."
}
]
},
"connection":{
"title":"Connection",
"description":"Database connection parameters.",
"type":"string",
"minLength":1
},
"schema":{
"title":"Schema",
"description":"Defines the structure of the table.",
"type":"object",
"properties":{
"recordDelimiter":{
"title":"Record Delimiter",
"description":"String used in the delimited file to indicate the end of a record.",
"type":"string",
"minLength":1
},
"fieldDelimiter":{
"title":"Field Delimiter",
"description":"Character used in the delimited file to indicate the end of a field value and the start of the next field value.",
"type":"string",
"minLength":1,
"maxLength":1
},
"fieldQuote":{
"title":"Field Quote",
"description":"Character used in the delimited file to quote a field value as needed.",
"type":"string",
"minimum":1,
"maxLength":1
},
"fields":{
"title":"Fields",
"description":"Definitions of the fields in the table schema.",
"type":"array",
"minItems":1,
"items":{
"type":"object",
"required":[
"fieldName",
"fieldType"
],
"properties":{
"fieldName":{
"title":"Field Name",
"description":"Name of the field in the table schema.",
"type":"string",
"minLength":1
},
"fieldType":{
"title":"Field Type",
"description":"Type of the field in the table schema.",
"type":"string",
"enum":[
"autoInc",
"boolean",
"currency",
"date",
"dateTime",
"float",
"integer",
"memo",
"smallInt",
"string",
"word"
],
"enumValues":[
{
"value":"autoInc",
"displayValue":"Auto-Increment",
"description":"Auto-incrementing 32-bit signed integer value."
},
{
"value":"boolean",
"displayValue":"Boolean",
"description":"Boolean value."
},
{
"value":"currency",
"displayValue":"Currency",
"description":"Currency value."
},
{
"value":"date",
"displayValue":"Date",
"description":"Date value."
},
{
"value":"dateTime",
"displayValue":"Date/Time",
"description":"Date/time (timestamp) value."
},
{
"value":"float",
"displayValue":"Floating Point",
"description":"Floating point numeric value."
},
{
"value":"integer",
"displayValue":"Integer",
"description":"32-bit signed integer value."
},
{
"value":"memo",
"displayValue":"Memo",
"description":"Binary value."
},
{
"value":"smallInt",
"displayValue":"Small Integer",
"description":"16-bit signed integer value."
},
{
"value":"string",
"displayValue":"String",
"description":"String value."
},
{
"value":"word",
"displayValue":"Word",
"description":"16-bit unsigned integer value."
}
]
},
"fieldSize":{
"title":"Field Size",
"description":"Size of the field in the table schema.",
"type":"integer",
"minimum":0,
"maximum":65535
}
},
"additionalProperties":false
}
}
},
"additionalProperties":false
}
},
"additionalProperties":false
}
},
"fieldMappings":{
"title":"Field Mappings",
"description":"Maps source fields to destination fields in the address table.",
"type":"array",
"items":{
"type":"object",
"required":[
"sourceField",
"destField"
],
"properties":{
"sourceField":{
"title":"Source Field",
"description":"Name of the field in the source tables.",
"type":"string",
"minLength":1
},
"destField":{
"title":"Destination Field",
"description":"Field reference identifying the destination field in the address table.",
"oneOf":[
{
"description":"Identifies a field by name.",
"type":"string",
"minLength":1
},
{
"description":"Identifies a field by display name.",
"type":"object",
"required":[
"displayName"
],
"properties":{
"displayName":{
"title":"Display Name",
"description":"Display name to match to a field.",
"type":"string",
"minLength":1
}
},
"additionalProperties":false
},
{
"description":"Identifies a field by address group and data type.",
"type":"object",
"required":[
"addressGroup",
"dataType"
],
"properties":{
"addressGroup":{
"title":"Address Group",
"description":"Address group to match to a field.",
"oneOf":[
{
"type":"integer",
"minimum":1,
"maximum":255
},
{
"type":"string",
"minLength":1
}
]
},
"dataType":{
"title":"Data Type",
"description":"Data type to match to a field.",
"oneOf":[
{
"type":"integer",
"minimum":1,
"maximum":255
},
{
"type":"string",
"minLength":1
}
]
}
},
"additionalProperties":false
}
]
}
},
"additionalProperties":false
}
}
},
"additionalProperties":false
}