'Imports the datasource from the object to the database.
Metrics and columns and datasource will be overridden if exists.
This function can be used to import/export dashboards between multiple
superset instances. Audit metadata isn\'t copies over.'

@classmethod
def import_obj(cls, i_datasource, import_time=None):

    def lookup_datasource(d):
        return db.session.query(DruidDatasource).join(DruidCluster).filter((DruidDatasource.datasource_name == d.datasource_name), (DruidCluster.cluster_name == d.cluster_name)).first()
    def lookup_cluster(d):
        return db.session.query(DruidCluster).filter_by(cluster_name=d.cluster_name).one()
    return import_util.import_datasource(db.session, i_datasource, lookup_cluster, lookup_datasource, import_time)
