Transformer class reference

This document covers features of the Transformer class.


class data_migrator.transform.Transformer(models=None, reader=None, argparser=None, outdir=None, emitter=<class 'data_migrator.emitters.mysql.MySQLEmitter'>)

Main transformation engine

Use this class as your main entry to build your Transformer

>>> if __name__ == "__main__":
>>>    t = transform.Transformer(models=[Model])
>>>    t.process()
__init__(models=None, reader=None, argparser=None, outdir=None, emitter=<class 'data_migrator.emitters.mysql.MySQLEmitter'>)
  • models (list) – list of all models to be processed in this transformer
  • reader – reference to and external reader if not <stdin>
  • argparse – reference to another argument parser if not default_parser
  • outdir – output directory for results, otherwise scan from argparser
  • emitter – emitter to be used for this transformation

Note that the order of models is relevant for the generation


Main processing loop