Exports data from an address table to a database.
This request exports to a dBASE or FoxPro file. It uses the selectivity
property to define selection criteria for the address table records.
The reply provides information about the records processed.
{
"$schema":"http://json-schema.org/draft-04/schema#",
"description":"Exports data from an address table.",
"type":"object",
"required":[
"addressTable",
"destination",
"fieldMappings"
],
"properties":{
"addressTable":{
"title":"Address Table",
"description":"Resource item identifying the address table.",
"type":"string",
"pattern":"(?i)^([0-9]{10}|name\\$.+|file\\$[a-z]+)$"
},
"index":{
"title":"Index",
"default":null,
"oneOf":[
{
"description":"Resource item identifying the index to use.",
"type":"string",
"pattern":"(?i)^((?!name\\$|default\\$).*|name\\$.+|default\\$)$"
},
{
"description":"Indicates that no index is to be used.",
"type":"null"
}
]
},
"selectivity":{
"title":"Selectivity",
"default":null,
"oneOf":[
{
"description":"Resource item identifying the selectivity to use.",
"type":"string",
"pattern":"(?i)^([0-9]{10}|name\\$.+|default\\$)$"
},
{
"description":"Indicates that no selectivity is to be used.",
"type":"null"
},
{
"description":"Defines a selectivity to use by its object representation, excluding the 'id' and 'name' properties.",
"type":"object",
"properties":{
"expression":{
"title":"Expression",
"description":"Expression defining the condition that a record must satisfy to be sampled.",
"default":null,
"oneOf":[
{
"type":"string",
"minLength":1
},
{
"type":"null"
}
]
},
"sampleInterval":{
"title":"Interval Sample",
"description":"Interval at which to sample records; if negative, the sample is inverted.",
"default":null,
"oneOf":[
{
"type":"integer"
},
{
"type":"null"
}
]
},
"sampleRandom":{
"title":"Random Sample",
"description":"Probability of a record being sampled at random.",
"default":null,
"oneOf":[
{
"type":"number",
"minimum":0,
"maximum":1
},
{
"type":"null"
}
]
},
"sampleMaximum":{
"title":"Maximum Sample",
"description":"The maximum number of records to be sampled.",
"default":null,
"oneOf":[
{
"type":"integer",
"minimum":0
},
{
"type":"null"
}
]
}
},
"additionalProperties":false
}
]
},
"destination":{
"title":"Destination",
"description":"Destination table.",
"type":"object",
"required":[
"classId",
"connection",
"schema"
],
"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",
"required":[
"fields"
],
"properties":{
"dbaseLevel":{
"title":"dBASE Level",
"description":"File format version of the dBASE file.",
"default":5,
"enum":[
5,
7
],
"enumValues":[
{
"value":5,
"displayValue":"dBASE IV/dBASE 5/Visual dBASE 5",
"description":"File format compatible with dBASE IV, dBASE 5 and Visual dBASE 5."
},
{
"value":7,
"displayValue":"Visual dBASE 7",
"description":"File format compatible with Visual dBASE 7."
}
]
},
"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, or length, of the field in the table schema.",
"type":"integer",
"minimum":0,
"maximum":65535
}
},
"additionalProperties":false
}
}
},
"additionalProperties":false
}
},
"additionalProperties":false
},
"overwrite":{
"title":"Overwrite",
"description":"Indicates whether or not to overwrite an existing table.",
"default":false,
"type":"boolean"
},
"fieldMappings":{
"title":"Field Mappings",
"description":"Maps source fields in the address table to destination fields.",
"type":"array",
"items":{
"type":"object",
"required":[
"sourceField",
"destField"
],
"properties":{
"sourceField":{
"title":"Source Field",
"description":"Field reference identifying the source 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
}
]
},
"destField":{
"title":"Destination Field",
"description":"Name of the field in the destination table.",
"type":"string",
"minLength":1
}
},
"additionalProperties":false
}
}
},
"additionalProperties":false
}