(Added Edited template with July 12, 2025.) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<message>Write the content here to display this box</message> | <message>Write the content here to display this box</message> | ||
==== SQLExport ServerSide Action ==== | ==== SQLExport ServerSide Action ==== | ||
Line 5: | Line 4: | ||
SQLExport requires 'connectionstring' on root, 'data' (column name must start with 'data', case insensitive) as a Nesting that contains the data row(s) to insert or update, and on data - 'queryforinsert','queryforupdate' and 'queryforselectcount' as attributes (if queryforselectcount returns 0 the queryforinsert is used, else update). | SQLExport requires 'connectionstring' on root, 'data' (column name must start with 'data', case insensitive) as a Nesting that contains the data row(s) to insert or update, and on data - 'queryforinsert','queryforupdate' and 'queryforselectcount' as attributes (if queryforselectcount returns 0 the queryforinsert is used, else update). | ||
'''Update 2025-04-15'''; You can now give a CommandTimeout column with a value as integer in seconds - default is 30. | |||
'''''Update 2018-10-18:''' You can now use 'connectionstringodbc' and the logic will use ODBC connection instead.'' | '''''Update 2018-10-18:''' You can now use 'connectionstringodbc' and the logic will use ODBC connection instead.'' | ||
Line 15: | Line 16: | ||
The data nesting must be collected even when you work in 1 object -> do self->asset | The data nesting must be collected even when you work in 1 object -> do self->asset | ||
'''<span style="color: #1a50ad">The MDriven Book</span>''' - '''Next Chapter:''' [[ | '''<span style="color: #1a50ad">The MDriven Book</span>''' - '''Next Chapter:''' [[Documentation:OCL Expressions|OCL Expressions]] | ||
{{Edited|July|12|2025}} | |||
[[Category:Advanced]] | [[Category:Advanced]] | ||
[[Category:MDriven Server]] | [[Category:MDriven Server]] | ||
[[Category:The MDriven Book]] | [[Category:The MDriven Book]] |
Latest revision as of 14:42, 15 April 2025
SQLExport ServerSide Action
The SQLExport action is used to write data from your model into another external SQL database. It is an alternative way to export data that needs no other external components or maintenance than what MDriven Server provides.
SQLExport requires 'connectionstring' on root, 'data' (column name must start with 'data', case insensitive) as a Nesting that contains the data row(s) to insert or update, and on data - 'queryforinsert','queryforupdate' and 'queryforselectcount' as attributes (if queryforselectcount returns 0 the queryforinsert is used, else update).
Update 2025-04-15; You can now give a CommandTimeout column with a value as integer in seconds - default is 30.
Update 2018-10-18: You can now use 'connectionstringodbc' and the logic will use ODBC connection instead.
The very common case of “replicating” some model-driven data to another database is implemented and scheduled in minutes.
Common Gotchas
The data nesting must be collected even when you work in 1 object -> do self->asset
The MDriven Book - Next Chapter: OCL Expressions