def get_acquisition_id_fuzzy(self, acquisition_dict):

        aq_length = (acquisition_dict['end_datetime'] -
                     acquisition_dict['start_datetime'])
        delta = (aq_length*self.FUZZY_MATCH_PERCENTAGE)/100
        params = dict(acquisition_dict)
        params['delta'] = delta

        sql = ("SELECT acquisition_id FROM acquisition\n" +
               "WHERE satellite_id = %(satellite_id)s AND\n" +
               "    sensor_id = %(sensor_id)s AND\n" +
               ("    x_ref = %(x_ref)s AND\n" if params['x_ref'] is not None else "    x_ref is null AND\n") +
               ("    y_ref = %(y_ref)s AND\n" if params['y_ref'] is not None else "    y_ref is null AND\n") +
               "    start_datetime BETWEEN\n" +
               "        %(start_datetime)s - %(delta)s AND\n" +
               "        %(start_datetime)s + %(delta)s AND\n" +
               "    end_datetime BETWEEN\n" +
               "        %(end_datetime)s - %(delta)s AND\n" +
               "        %(end_datetime)s + %(delta)s;")
        result = self.execute_sql_single(sql, params)
        acquisition_id = result[0] if result else None

        return acquisition_id
Finds the id of an acquisition record in the database.
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/abstract_ingester/ingest_db_wrapper.py/IngestDBWrapper.get_acquisition_id_fuzzy