dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
39.35k stars 3.4k forks source link

Script Runner #4337

Open surpavan opened 5 years ago

surpavan commented 5 years ago

Script Runner Since Dbeaver takes many databases now, It might be a good time to add inline DBConnect and Disconnect features - this will help in making a single script that can handle more than one database in a single script.

Example: DBeaver:Connect-MySQLSampleDB some out file sql script DBeaver:DisConnect-MySQLSampleDB

DBeaver:Connect-MySQLProdDB load from infile sql script DBeaver:DBConnect-MySQLProdDB

In long runs add the save as csv etc inline DBeaver codes with which simple ETL jobs can be handled in SQL code itself.

serge-rider commented 4 years ago

Now, when we can create SQL script tasks it will be quite easy to add multiple connections support in it.

surpavan commented 4 years ago

Now, when we can create SQL script tasks it will be quite easy to add multiple connections support in it.

Looking forward for it.

surpavan commented 4 years ago

I do not see tasks as scripts, they are more of routine jobs. The issue is that since all the connections are stored in DBBeader, we should be able to type a line to connect to that db and run the below query till the disconneciton line. So everything is in one script. Jobs are more like task schedulers to run a script, but with the above, it would be like a sql language

serge-rider commented 4 years ago

@surpavan Yep, tasks is a different feature.

This feature may be solved by adding new command like @connect ConnectionName

surpavan commented 4 years ago

@connect ConnectionName yup and @disconnect

I would like to help too, but unfortunately I am not into java.