"deleteIntegrationTable"
The JSON Edge API "deleteIntegrationTable
action deletes an existing FairCom Edge integration table as long as there are no dependencies on it
deleteIntegrationTable deletes an integration table as long as there are no dependencies on it.
The "deleteIntegrationTables"
action deletes an integration table as long as there are no dependencies on it.
Things to know
A dependency occurs when an input plugin, output plugin, or a transform process uses the table.
If the table does not exist, it logs the error: "deleteIntegrationTables cannot delete table xxx because it does not exist."
If the table cannot be deleted, it logs the error: "deleteIntegrationTables cannot delete table xxx because yyy."
This action removes a table and all its data and connections/integrations.
This action cannot be used to delete MQTT integration tables because they are used by MQTT topics. Instead, use
"deleteTopic"
.
Request examples
Delete one integration table request example
{ "api": "hub", "requestId": "1", "action": "deleteIntegrationTables", "params": { "databaseName": "faircom", "tableNames": [ "test1" ] } }
{ "authToken": "anAuthorizationTokenFromTheServer", "requestId": "2", "api": "hub", "action": "deleteIntegrationTables", "params": { "databaseName": "faircom", "tableNames": [ "test2", "test3" ] }, "apiVersion": "1.0", "debug": "max" }
Response examples
{ "authToken": "authToken", "result": {}, "requestId": "1", "errorCode": 0, "errorMessage": "" }
{ "authToken": "authToken", "result": {}, "requestId": "3", "debugInfo": { "request": { "authToken": "authToken", "api": "hub", "action": "deleteIntegrationTables", "params": { "databaseName": "faircom", "tableNames": [ "test2", "test3" ] }, "apiVersion": "1.0", "requestId": "00000008", "debug": "max" } }, "errorCode": 100, "errorMessage": "Not able to find integration by name [test2/admin/faircom]]." }
"params"
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Properties summary
"params"
properties summaryProperty | Description | Default | Type | Limits (inclusive) |
---|---|---|---|---|
specifies the name of a database | Defaults to the | string | 1 to 64 bytes | |
specifies the unique name of a schema in a database |
| string | 1 to 64 bytes | |
lists table names to return in the response message | Required - No default value | array |
The "databaseName"
property is an optional string that specifies the database that contains the tables. It defaults to the database name supplied at login.
Note
In the API Explorer, "defaultDatabaseName"
is set to "ctreeSQL"
in the "createSession"
action that happens at login.
A zero-length
"databaseName"
is invalid.Its limits are from 0 to 64 bytes.
If the
"databaseName"
property is omitted or set tonull
, the server will use the default database name specified at login.If no default database is specified during
"createSession"
,"defaultDatabaseName"
will be set to the"defaultDatabaseName"
value that is specified in theservices.json
file.
The "ownerName"
property is an optional string from 1 to 64 bytes that specifies the account that owns an object.
The
"ownerName"
property is optional and has a dynamic default value.If the
"ownerName"
property is omitted or set tonull
, the server uses the value of the"defaultOwnerName"
property supplied during the "createSession"
action.If the
"defaultOwnerName"
property is not defined, the server uses the"admin"
as the owner name.The owner of an object has administrative rights over that object.
The
"ownerName"
property is a namespace for an object. You can think of it as a container of objects.The
"ownerName"
allows users to use any name for the objects they create — for example, a QA engineer may copy tables into their owner space to run a set of tests.It is common for a user to create their own copies of objects from other accounts for testing, troubleshooting, and fixing data. The copied objects can retain the same name because the
"ownerName"
distinguishes between them.The fully qualified name of an object is the
"databaseName"
,"ownerName"
, and the object's name, such as"tableName"
meaning a FairCom server may contain many tables with the name"mytable"
as long as each one is in a different database or in a different owner space.For example, an organization often creates different databases for different phases of the development lifecycle, such as dev, test, stage, ua, and prod. Each of these databases contains the same set of objects with the same names. Applications leave the
"databaseName"
out of their JSON actions and use the"defaultDatabaseName"
property to specify the target database.Queries and scripts are often written without specifying
"databaseName"
and/or"ownerName"
, allowing queries and scripts to work properly when run in different databases or in different schemas.
The "tableNames"
property is a required array of strings. Each string is from 1 to 64 bytes.
Contains at least one string.
Each string is the name of a table.
A zero-length
"tableName"
is invalid.A client should force the uniqueness of items in the array because the server ignores duplicate items.