Description
The MySQLCreateTableV2Receiver can be used to create a table in a MySQL database.
In This Article
Receiver Parameters
The following parameters can be defined for the MySQLCreateTableV2Receiver. Items with an asterisk (*) are required.
- resourcePath* - Defines the directory of the resource that contains the database connection information on the user's local machine.
- resourceSubDir - Defines the sub-directory of the resource that contains the database connection information on the user's local machine.
- resourceName* - Defines the name of the resource that contains the database connection information on the user's local machine.
- databaseName* - The name of the database to create the SQL table in.
- tableName* - The name of the SQL table.
- engineType* - Specifies which MySQL database engine to use.
- primaryKeyName - Specifies the name of the attribute that is recognized as the table's primary key.
- autoIncrement* - Specifies if the primary key should be auto incremented.
- characterSet*- Specifies the character set to be used when creating the table.
- endOfLine* - The character(s) appended to the end of each line depending on the operating system.
- path - Defines the directory path where the output file should be stored.
- fileName - Name of the file the SQL create statement will be output to.
Column Data Types
This Receiver uses the following MySQL specific column data types:
- BIGINT
- BIGINT UNSIGNED
- BINARY
- BIT
- BLOB
- BOOL
- CHAR
- DATE
- DATETIME
- DECIMAL
- DOUBLE
- DOUBLE PRECISION
- ENUM
- FLOAT
- INT
- INT UNSIGNED
- LONG VARBINARY
- LONG VARCHAR
- LONGBLOB
- LONGTEXT
- MEDIUMBLOB
- MEDIUMINT
- MEDIUMINT UNSIGNED
- MEDIUMTEXT
- NUMERIC
- REAL
- SET
- SMALLINT
- SMALLING UNSIGNED
- TEXT
- TIME
- TIMESTAMP
- TINYBLOB
- TINYINT
- TINYINT UNSIGNED
- TINYTEXT
- VARBINARY
- VARCHAR
JDBC Configuration File
This Receiver utilizes a configuration file stored locally on the user's computer or a shared test server to obtain the necessary information to connect to a specific database via JDBC. For detailed information, refer to 'What is a JDBC Config File?'
Receiver Attribute Property Keys
The Receiver defines nine property keys that can be modified on any of its associated Domain Attributes:
- columnName - Specifies the column name as it will be created in the SQL statement.
- columnType - Specifies the type of column that will be created.
- columnSize - Specifies the size of the column.
- notNull - Specifies whether a column is or is not null.
- foreignTable - Name of the table to reference for the foreign key.
- foreignColumn - Name of column to reference in foreign table.
- onUpdate - InnoDB supports foreign key constraints for ON UPDATE.
- onDelete - InnoDB supports foreign key constraints for ON DELETE.
- unique - Specifies whether a column has a unique index.