$OCSSWROOT/bin/seadasutils/ancDB.py

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
oo_processing
Posts: 338
Joined: Wed Apr 06, 2005 12:11 pm America/New_York
Answers: 0
Has thanked: 10 times
Been thanked: 3 times

$OCSSWROOT/bin/seadasutils/ancDB.py

by oo_processing » Fri Jul 05, 2024 2:18 pm America/New_York

Dear Support,

The function delete_record doesn't work as expected, probably because it's not extensively tested.
The current V2024.0, from line 134

Code: Select all

        
        else:
            satid = self.check_file(filename, starttime=starttime)
            ancids = conn.execute('select ancid from satancinfo where satid = ?', [satid])
            for a in ancids:
                c.execute('DELETE from satancinfo where ancid = ?', [a[0]])
                c.execute('DELETE from ancfiles where ancid = ?', [a[0]])
Using ancid as key to delete records in tables satancinfo and ancfiles would delete records needed by other satid. Therefore my suggestion is

Code: Select all

        else:
            satid = self.check_file(filename, starttime=starttime)
            c.execute('DELETE from satancinfo where satid = ?', [satid])
            c.execute('DELETE from satfiles where satid = ?', [satid])
Thanks,
Yuyuan

Filters:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 715
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 10 times

Re: $OCSSWROOT/bin/seadasutils/ancDB.py

by OB SeaDAS - xuanyang02 » Tue Sep 17, 2024 11:14 am America/New_York

Thanks, Yuyuan for your suggestion! We'll test your code and adopt it accordingly.

oo_processing
Posts: 338
Joined: Wed Apr 06, 2005 12:11 pm America/New_York
Answers: 0
Has thanked: 10 times
Been thanked: 3 times

Re: $OCSSWROOT/bin/seadasutils/ancDB.py

by oo_processing » Wed Mar 26, 2025 7:10 pm America/New_York

Excited to see the new code implemented in tag V2025.1

Cheers!
Yuyuan

Post Reply