mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-26 15:10:05 +00:00
Add documentation for backend dev env data source setup (#2636)
This commit is contained in:
parent
b5ddada930
commit
5efd00135c
BIN
docs/.gitbook/assets/browse-db.png
Normal file
BIN
docs/.gitbook/assets/browse-db.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
BIN
docs/.gitbook/assets/db-tool.png
Normal file
BIN
docs/.gitbook/assets/db-tool.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 460 KiB |
BIN
docs/.gitbook/assets/run-sql-query.png
Normal file
BIN
docs/.gitbook/assets/run-sql-query.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 730 KiB |
BIN
docs/.gitbook/assets/setup-connection.png
Normal file
BIN
docs/.gitbook/assets/setup-connection.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
@ -18,6 +18,10 @@ We use Java for developing OpenMetadata backend server. Following are the key te
|
||||
[code-generation.md](code-generation.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
{% content-ref url="env-setup.md" %}
|
||||
[env-setup.md](env-setup.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
{% content-ref url="debugging.md" %}
|
||||
[debugging.md](debugging.md)
|
||||
{% endcontent-ref %}
|
||||
{% endcontent-ref %}
|
||||
|
||||
51
docs/open-source-community/developer/backend/env-setup.md
Normal file
51
docs/open-source-community/developer/backend/env-setup.md
Normal file
@ -0,0 +1,51 @@
|
||||
# Dev Environment Setup
|
||||
|
||||
This document guides you through setting up the dev environment for OpenMetadata backend.
|
||||
|
||||
Most of us developers on OpenMetadata use [IntelliJ IDEA](https://www.jetbrains.com/idea/) for backend development.
|
||||
|
||||
## Setting up the Project
|
||||
|
||||
TODO
|
||||
|
||||
## Database Connection Setup
|
||||
|
||||
Ensure that the local mysql docker container is running from the previous step.
|
||||
|
||||
```bash
|
||||
$ docker ps -a
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
cb89f6085688 openmetadata/db:latest "/entrypoint.sh mysq…" 17 hours ago Up 17 hours (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060-33061/tcp local-metadata_mysql_1
|
||||
```
|
||||
|
||||
Open the database tool from IntelliJ IDEA View menu.
|
||||
|
||||

|
||||
|
||||
Set up the data source using the [database credentials](https://github.com/open-metadata/OpenMetadata/blob/main/docker/local-metadata/mysql-script.sql) that was used to spin up the openmetadata/db docker container.
|
||||
The configuration should look like the one described in the screenshot below:
|
||||
|
||||
Test Connection before proceeding to the next step.
|
||||
|
||||

|
||||
|
||||
After the data source is set up, you'll be able to see the tables in the IntelliJ Database tool.
|
||||
|
||||

|
||||
|
||||
With the data source setup, you are now able to run queries against OpenMetadata's local MySQL database.
|
||||
|
||||

|
||||
|
||||
Alternatively, you may log in to the docker container and run SQL queries directly with the mysql client:
|
||||
```bash
|
||||
$ docker exec -it local-metadata_mysql_1 bash -c 'mysql -uopenmetadata_user -popenmetadata_password -Dopenmetadata_db'
|
||||
|
||||
mysql> SELECT COUNT(*) FROM role_entity;
|
||||
+----------+
|
||||
| COUNT(*) |
|
||||
+----------+
|
||||
| 2 |
|
||||
+----------+
|
||||
1 row in set (0.02 sec)
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user