52 lines
3.8 KiB
Markdown
52 lines
3.8 KiB
Markdown
|
|
# DBeaver set up
|
|||
|
|
|
|||
|
|
DBeaver is the de facto SQL client in the Data team.
|
|||
|
|
|
|||
|
|
Feel free to use anything you want, but if you don’t have a preference, picking DBeaver is probably a decent option.
|
|||
|
|
|
|||
|
|
## Installing
|
|||
|
|
|
|||
|
|
- Make sure to get DBeaver **Community Edition**. This is the free, open-source version, and it’s what we’re currently using.
|
|||
|
|
- You can download from here: [https://dbeaver.io/download/](https://dbeaver.io/download/)
|
|||
|
|
- Feel free to pick the most recent version, we haven’t determined to freeze on any specific one.
|
|||
|
|
- Install with all default settings
|
|||
|
|
|
|||
|
|
## Creating connections to Postgres
|
|||
|
|
|
|||
|
|
- To create a new connection to Postgres you can click on the Plug + button on the top left corner of DBeaver and selecting PostgreSQL as your database, which will lead you to a screen like this:
|
|||
|
|
|
|||
|
|

|
|||
|
|
|
|||
|
|
- [Connecting to the DWH](Connecting%20to%20the%20DWH%20b7872e2027d041ffac1363b9c2615971.md) here you can check all details to connection to the DWH.
|
|||
|
|
- *Optional, only for Data Team members*
|
|||
|
|
|
|||
|
|
To create a connection to Postgres for your own Local DWH you can find all the step by step information in the DWH DBT Project **(data-dwh-dbt-project\dev-env\local_dwh.md)**. Here you will find all the requirements needed and how to set up the `dwh` and `dwh_hybrid` for you to develop locally.
|
|||
|
|
|
|||
|
|
|
|||
|
|
**
|
|||
|
|
|
|||
|
|
## Creating connections to SQL Server
|
|||
|
|
|
|||
|
|
- To create a new connection to a SQL Server, just like before you can click on the Plug + button on the top left corner of DBeaver and selecting SQL Server as your database, which will lead you to a very similar screen as shown before so you can add all the necessary details for the connection.
|
|||
|
|
- [Connecting to Core](Connecting%20to%20Core%206ecf68bb25bc489ea8f38ac971e1a2c1.md) here you can find all details to connect to the Core database.
|
|||
|
|
|
|||
|
|
## Tips and gotchas
|
|||
|
|
|
|||
|
|
- See all databases when connecting to postgres server: For some weird default setting from dbeaver you won’t be able to see all databases, you might see this problem after creating your local copy for `dwh` and `dwh_hybrid` , it is very simple to solve this but also easy to forget. Just go to your database, go into edit connection and check on the `Show all databases` box which you should see in the Main tab. This could change for future versions of DBeaver, but it shouldn’t be too hard to find.
|
|||
|
|
|
|||
|
|

|
|||
|
|
|
|||
|
|
- To deactivate the auto upper case of key words in DBeaver, in case it it’s annoying for you, you can go to:
|
|||
|
|
- Window → Preferences → Editors → SQL Editor → Formatting
|
|||
|
|
|
|||
|
|
Here you can configure the formatting of your queries on DBeaver however you like
|
|||
|
|
|
|||
|
|

|
|||
|
|
|
|||
|
|
- If you want to connect to DWH, make sure to review VPN guide, otherwise this won’t work. [VPN Set up](VPN%20Set%20up%2001affb09a9f648fbad89b74444f920ca.md)
|
|||
|
|
- DBeaver makes it easy to export data in various formats (CSV, JSON, SQL scripts, etc.). You can use some of the calculation features at the bottom of the results to obtain some quick information like the total amount of rows from the result of your query, to load all the results of the query so you can export all data (by default it loads the first 200 rows), **though be careful with this because it might be too much data and computationally demaning,** and the export data button.
|
|||
|
|
|
|||
|
|

|
|||
|
|
|
|||
|
|
- You can also filter some of the results of your query directly on the table, you can just simply click on the blue arrow to the right of each column and find multiple filters to easily analyse results, this is only recommended for small queries.
|
|||
|
|
- If you have any issues backing up tables in DBeaver or creating dumps, check out the following documentation [Can’t backup single tables from DWH in DBeaver](Can%E2%80%99t%20backup%20single%20tables%20from%20DWH%20in%20DBeaver%20df6fc66189db415faa9715376832e5ba.md)
|