MySqlDescribe
Execute a MySQL DESC statement.
Added in version 1.0.0.
Friendly name:
MySQL DescribeStep class:
base_steps_syncpack.steps.MySqlDescribe.MySqlDescribeStep version:
1.1.1Required parameters:
table,database,host,username,password,port
Parameters
Name |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
yes |
– |
The database Table Example: |
|
string |
yes |
– |
The database Example: |
|
string |
yes |
– |
The host of the database Example: |
|
string |
yes |
– |
The db username Example: |
|
string |
yes |
– |
The db password Example: |
|
number |
yes |
|
The port number to use when establishing a connection to the remote sql server. |
Every step also accepts the platform parameters common to all steps – see Platform parameters.
Dependencies
Inherits from:
MySqlDescribe->BaseStep->SerializableSyncPack modules:
base_steps_syncpack.util.mysql_utilsExternal packages:
ipaascommon,ipaascore
Behaviour
Connects through util.mysql_utils.util_connect_mysql and runs
DESC {table}. Useful for discovering a schema at runtime rather than
hardcoding column names into a workflow.
Outputs
A list of row dicts describing the columns (DictCursor), or []:
[
{"Field": "id", "Type": "int(11)", "Null": "NO", "Key": "PRI"},
{"Field": "device", "Type": "varchar(64)", "Null": "YES", "Key": ""}
]
Notes
tableis required here, unlike MySqlSelect where it is optional.portdefaults to7706, the SL1 MySQL port.The column keys are MySQL’s own (
Field,Type,Null,Key,Default,Extra) and are capitalised. The MS-SQL equivalent, MicrosoftSqlDescribe, returns tuples instead, so the two are not interchangeable downstream.