'Returns datasource with columns and metrics.'

@classmethod
def get_eager_datasource(cls, session, datasource_type, datasource_id):

    datasource_class = ConnectorRegistry.sources[datasource_type]
    return session.query(datasource_class).options(subqueryload(datasource_class.columns), subqueryload(datasource_class.metrics)).filter_by(id=datasource_id).one()
