sqlcsv-importmagic-draw

MagicDraw CSV Import SQL scheme as «Persistent Table» and «Column»


We need to import from a CSV file a SQL scheme as

CSV columns: TAB_NAME; COL_NAME; COL_TYPE; COL_COMMENT

CSV record example: "MYTAB"; "COL1"; "char"; "Just an example"

CSV Import pass 1:

CSV Import pass 2: import each column as Property of stereotype «Column»

No matter what we provide in the CSV column COL_TYPE, we get import errors for each record in the CSV file: e.g. "Could not find element char in com.nomagic.uml2.ext.magicdraw.classes.mdkernel.impl.PackageImpl@e25070db."

For example for SQL type CHAR

What can we do? Is it possible to provide an "inner mapping" form the string "char" to "SQL ANSI Type char" ?


Solution

  • The MagicDraw CSV Import Plugin is just not capable enough to be used in the intended way.

    Because we have to import masses of data into MagicDraw, we decided to develop a plugin in Java ourselfs.

    MagicDraw comes with enough examples for that. Maybe one hint can help you to overcome starting problems:

    Do not start an older version of MagicDraw from within an older but matching version of Eclipse, even if the documentation tells so.

    It is much easier to use a current Eclipse version with matching JDK version, produce a JAR file as result direct into the local MagicDraw installation (plugin folder) and then attach the Eclipse debugger remotely to the running MagicDraw application. Minor code changes are replaces inside your plugin at runtime. Structural changes need to restart MagicDraw.