Beispiel #1
0
    def import_obj(cls, i_metric):
        def lookup_obj(lookup_metric):
            return db.session.query(SqlMetric).filter(
                SqlMetric.table_id == lookup_metric.table_id,
                SqlMetric.metric_name == lookup_metric.metric_name).first()

        return import_datasource.import_simple_obj(db.session, i_metric,
                                                   lookup_obj)
Beispiel #2
0
    def import_obj(cls, i_column):
        def lookup_obj(lookup_column):
            return db.session.query(TableColumn).filter(
                TableColumn.table_id == lookup_column.table_id,
                TableColumn.column_name == lookup_column.column_name).first()

        return import_datasource.import_simple_obj(db.session, i_column,
                                                   lookup_obj)
    def import_obj(cls, i_metric):
        def lookup_obj(lookup_metric):
            return db.session.query(ElasticMetric).filter(
                ElasticMetric.datasource_name == lookup_metric.datasource_name,
                ElasticMetric.metric_name ==
                lookup_metric.metric_name).first()

        return import_datasource.import_simple_obj(db.session, i_metric,
                                                   lookup_obj)
    def import_obj(cls, i_column):
        def lookup_obj(lookup_column):
            return db.session.query(ElasticColumn).filter(
                ElasticColumn.datasource_name == lookup_column.datasource_name,
                ElasticColumn.column_name ==
                lookup_column.column_name).first()

        return import_datasource.import_simple_obj(db.session, i_column,
                                                   lookup_obj)
 def import_obj(cls, i_metric):
     def lookup_obj(lookup_metric):
         return db.session.query(SqlMetric).filter(
             SqlMetric.table_id == lookup_metric.table_id,
             SqlMetric.metric_name == lookup_metric.metric_name).first()
     return import_datasource.import_simple_obj(db.session, i_metric, lookup_obj)
 def import_obj(cls, i_column):
     def lookup_obj(lookup_column):
         return db.session.query(TableColumn).filter(
             TableColumn.table_id == lookup_column.table_id,
             TableColumn.column_name == lookup_column.column_name).first()
     return import_datasource.import_simple_obj(db.session, i_column, lookup_obj)