Hi folks, this is a vague question but should be a good hot topic - I have to do a ton of data migration/conversion in our database, consolidating and denormalizing a couple of sets of tables into a single set.

My cow-orkers are trying to get me to use SQL only to get the job done, but I think using perl (which I know better anyway) will afford me a lot of flexibility and precision, as well as allowing me to massage the data a little more. I'm pretty good with AoH's and even more mutated structures so I'm pretty confident I can get the job done with perl.

I am even wondering if using XML as an intermediate step when I transform the data would be a good thing. I am certain it will help me visualize the data before and after transformation, but is it necessary?

Uh, obviously this is somewhat new territory for me ... the main thing I'm hoping for is to get the job done quickly and accurately, and hopefully get a script out of this that I can use multiple times without having to code a lot of changes .... I'm hoping the wisdom of the monks may put me on the path to righteousness (or at least well formed data structures!)

mr.dunstan
humble novice

In reply to Data Migration Perl style vs. SQL style.... by mr.dunstan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.