def get_dataset_records(self, dataset_name_list):
        
        dataset_records = {}
        for dataset_name in dataset_name_list:
            if self.target == 'dataset': # Only return exact matches
                match_pattern = '.*/' + dataset_name + '$'
            else: # Return all versions
                #
                match_pattern = '.*/' + re.sub('_(\d){1,3}$', '', dataset_name) + '(_(\d){1,3})*$'
                
            if self.target == 'acquisition':
                sql = """-- Find all datasets derived from acquisition of specified dataset name
select
    """ + \
',\n    '.join(self.dataset_field_list) + \
"""
from dataset
join (
    select distinct acquisition_id from dataset where dataset_path ~ '""" + match_pattern + """'
    ) a using(acquisition_id);"""
            else:
                sql = """-- Find datasets matching provided name
select
    """ + \
',\n    '.join(self.dataset_field_list) + \
"""
from dataset where dataset_path ~ '""" + match_pattern + """';"""
        
            log_multiline(logger.debug, sql, 'SQL', '\t')
            self.db_cursor.execute(sql)
            
            for record in self.db_cursor:
                dataset_records[record[0]] = dict(zip(self.dataset_field_list, record))
            
        log_multiline(logger.debug, dataset_records, 'dataset_records', '\t')
        return dataset_records
Return a nested dict containing all dataset record info for datasets matching specified names keyed by dataset_id
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/remove_tiles.py/TileRemover.get_dataset_records