Well for instance here you're copying a var to a var, perhaps with some
naming convention, some dictionary access, you could automate some of this
configuration?


On Tue, Apr 30, 2013 at 7:30 AM, Maxime Verger-Del Bove <
notifications@github.com> wrote:

> In gooddataclient/columns.py:
>
> > -        # change the data type if needed
> > -        if self.dataType:
> > -            data_type = 'INT' if self.dataType == 'IDENTITY' else self.dataType
> > -            maql.append('ALTER DATATYPE {%(identifier)s} %(data_type)s;'
> > -                        % {
> > -                            'dataset': self.schema_name,
> > -                            'name': self.name,
> > -                            'data_type': data_type,
> > -                            'identifier': self.identifier,
> > -                        })
> > -        else:
> > -            maql.append('')
> > -        return '\n'.join(maql)
> > +    TEMPLATE_CREATE = FACT_CREATE
> > +    TEMPLATE_DATATYPE = FACT_DATATYPE
> > +    TEMPLATE_DROP = FACT_DROP
>
> yes, they are class attributes. Based on these we have a function in
> column that get the right templates. Not sure how you want to make this
> more generic.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Work4Labs/gooddata-python/pull/5/files#r4019253>
> .
>