.. _step-MySqlInsert: MySqlInsert =========== Execute a MySQL INSERT statement. .. versionadded:: 1.0.0 * **Friendly name:** ``MySQL Insert`` * **Step class:** ``base_steps_syncpack.steps.MySqlInsert.MySqlInsert`` * **Step version:** ``1.1.1`` * **Required parameters:** ``database``, ``host``, ``username``, ``password``, ``port`` Parameters ---------- .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - Name - Type - Required - Default - Description * - ``table`` - string - no - -- - The database table name. Example: ``Users`` * - ``database`` - string - yes - -- - The database name. Example: ``database1`` * - ``host`` - string - yes - -- - The host of the database. Example: ``host1`` * - ``username`` - string - yes - -- - The database username. Example: ``db_user_name`` * - ``password`` - string - yes - -- - The database password. Example: ``db_user_password`` * - ``insert_query`` - string (long) - no - -- - A full INSERT statement. Overrides the 'data' parameter. Example: ``INSERT INTO table_name (column1, column2) VALUES (value1, value2);`` * - ``data`` - json - no - -- - The data to insert into the database table. Example: ``{'name': 'Fred Smith', 'address': '2900 Main Street'}`` * - ``port`` - number - yes - ``7706`` - The port of the database. Example: ``8008`` Every step also accepts the platform parameters common to all steps -- see :ref:`platform-parameters`. Dependencies ------------ * **Inherits from:** ``MySqlInsert`` -> ``BaseStep`` -> ``Serializable`` * **SyncPack modules:** ``base_steps_syncpack.util.mysql_utils`` * **External packages:** ``ipaascommon``, ``ipaascore`` .. include:: /_step_notes/MySqlInsert.rst API --- .. autoclass:: base_steps_syncpack.steps.MySqlInsert.MySqlInsert :members: :show-inheritance: