# Path: hecatoncheir/logger.py
# def to_unicode(s):
# def str2unicode(s):
# def setup():
# def ts():
# def trace(msg):
# def debug(msg):
# def info(msg):
# def info_cont(msg):
# def info_end(msg):
# def warning(msg):
# def error(msg, detail=None, query=None):
# def dump_datetime_default(o):
# def dump(msg, obj):
# 
# Path: hecatoncheir/msgutil.py
# class DbProfilerJSONEncoder(json.JSONEncoder):
#     def default(self, o):
#         try:
#             iterable = iter(o)
#         except TypeError:
#             pass
#         else:
#             return list(iterable)
# 
#         if isinstance(o, datetime.datetime):
#             return o.isoformat()
#         elif isinstance(o, datetime.date):
#             return o.isoformat()
#         elif isinstance(o, decimal.Decimal):
#             return (str(o) for o in [o])
#         return super(DbProfilerJSONEncoder, self).default(o)
# 
# Path: hecatoncheir/msgutil.py
# class DbProfilerJSONEncoder(json.JSONEncoder):
#     def default(self, o):
# def jsonize(data):


import copy
import json
import sys
import dateutil.parser
from datetime import datetime
from hecatoncheir import logger as log
from hecatoncheir.msgutil import DbProfilerJSONEncoder
from hecatoncheir.msgutil import gettext as _

        self.database_name = database_name
        self.schema_name = schema_name
        self.table_name = table_name
        self.table_name_nls = None
        self.timestamp = None
        self.row_count = None
        self.column_names = None
        self.columns = []
        self.comment = None
        self.sample_rows = None
        self.__assert()

    def __assert(self):
        assert isinstance(self.database_name, unicode)
        assert isinstance(self.schema_name, unicode)
        assert isinstance(self.table_name, unicode)
        assert (isinstance(self.table_name_nls, unicode) or
                self.table_name_nls is None)
        assert isinstance(self.timestamp, datetime) or self.timestamp is None
        assert isinstance(self.row_count, long) or self.row_count is None
        assert isinstance(self.column_names, list) or self.column_names is None
        assert isinstance(self.columns, list) or self.columns is None
        assert isinstance(self.comment, unicode) or self.comment is None
        assert isinstance(self.sample_rows, list) or self.sample_rows is None

    def get_column_meta(self, column_name):
        for c in self.columns:
            if c.name == column_name:
                return c

# Path: hecatoncheir/logger.py
# def to_unicode(s):
# def str2unicode(s):
# def setup():
# def ts():
# def trace(msg):
# def debug(msg):
# def info(msg):
# def info_cont(msg):
# def info_end(msg):
# def warning(msg):
# def error(msg, detail=None, query=None):
# def dump_datetime_default(o):
# def dump(msg, obj):
# 
# Path: hecatoncheir/msgutil.py
# class DbProfilerJSONEncoder(json.JSONEncoder):
#     def default(self, o):
#         try:
#             iterable = iter(o)
#         except TypeError:
#             pass
#         else:
#             return list(iterable)
# 
#         if isinstance(o, datetime.datetime):
#             return o.isoformat()
#         elif isinstance(o, datetime.date):
#             return o.isoformat()
#         elif isinstance(o, decimal.Decimal):
#             return (str(o) for o in [o])
#         return super(DbProfilerJSONEncoder, self).default(o)
# 
# Path: hecatoncheir/msgutil.py
# class DbProfilerJSONEncoder(json.JSONEncoder):
#     def default(self, o):
# def jsonize(data):


# Path: hecatoncheir/metadata.py
import copy
import json
import sys
import dateutil.parser
from datetime import datetime
from hecatoncheir import logger as log
from hecatoncheir.msgutil import DbProfilerJSONEncoder
from hecatoncheir.msgutil import gettext as _


        self.database_name = database_name
        self.schema_name = schema_name
        self.table_name = table_name
        self.table_name_nls = None
        self.timestamp = None
        self.row_count = None
        self.column_names = None
        self.columns = []
        self.comment = None
        self.sample_rows = None
        self.__assert()

    def __assert(self):
        assert isinstance(self.database_name, unicode)
        assert isinstance(self.schema_name, unicode)
        assert isinstance(self.table_name, unicode)
        assert (isinstance(self.table_name_nls, unicode) or
                self.table_name_nls is None)
        assert isinstance(self.timestamp, datetime) or self.timestamp is None
        assert isinstance(self.row_count, long) or self.row_count is None
        assert isinstance(self.column_names, list) or self.column_names is None
        assert isinstance(self.columns, list) or self.columns is None
        assert isinstance(self.comment, unicode) or self.comment is None
        assert isinstance(self.sample_rows, list) or self.sample_rows is None

    def get_column_meta(self, column_name):
        for c in self.columns:
            if c.name == column_name:
                return c

        raise ValueError(_(u'Column "%s" not found on table "%s.%s".') %