I have a list of databases I want to drop under a certain condition. I know GridDB SQL is not like Python where you can write commands under a condition block. But I would like to know if I can delete databases that have been updated only in the last two years. Suppose I have 32 databases, or more, I want to delete the old databases with an SQL command similar to the one below, if possible:
// Condition
DROP DATABASE database;
or using Pandas, in Python:
sql_statement = ('DROP DATABASE database')
df = pd.read_sql_query(sql_statement, cont)
Maybe database
is from a generator or something. How can I go about that?
I am using GridDB Python client on my Ubuntu machine. Thanks in advance for your help!