I have a file that contains multiple select queries.
I run these on a weekly basis to generate internal company reports
For example (these are not the actual queries):
-- Select number of users
SELECT count(id) from users;
-- Select number of active users
SELECT count(id) from users where active = true;
-- Select number of logins this week
SELECT count(id) from users where last_login > current_date - interval '1 week';
--- etc...
Is there a way, in DataGrip, to run all of these queries and export them to csv files?
I am able to run each query and then export the dataset, however, is a time consuming process doing this one by one.
2
Answers
I believe there isn’t a convenient way.
As a workaround, will combining all queries into one solve your problem?
It’s not the most elegant way, but you’ll get all the data displaying in a single result:
It’s possible. Select all queries and then use
Execute To Files
: