Customer Portal

Create Table from Metadata has incorrect lengths

Comments 3

  • Avatar
    tkramolis
    0
    Comment actions Permalink
    Hi there,

    solution is quite simple: After extracting metadata from MS SQL, switch type of resulting metadata to "fixed" or "mixed" (see attached picture). Subsequent database table creation will then take sizes of string fields into account.

    Best regards,

    Tom

    Javlin a.s.
  • Avatar
    twoolworth
    0
    Comment actions Permalink
    Thank you for showing me that feature as that's not something I even realized I could play with. Changing it to either fixed or mixed seems to give me proper lengths on the individual fields it does however seem to create an incorrect DDL now in being able to generate the tables... Basically in MSSQL you're allowed to have CHAR's that specify a length of 500, 2000. MySQL however says no and wants you to use either TEXT or BLOB for the field types. Is there a different route I should be going for this? I've attached a screenshot of what it is I'm talking about and receiving error wise.
  • Avatar
    julrych
    0
    Comment actions Permalink
    You can simply change CHAR to VARCHAR in the generated Create table statement. This should resolve your issues. I have raised this with CloverETL development team as bug CLD-3045 to actually use VARCHAR instead of CHAR by default.

Please sign in to leave a comment.