From f43aaf415065f66d12db65ae2eaa4237a25ec152 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Fri, 9 Jun 2023 09:31:07 +0530 Subject: [PATCH] Add database name filed for oracle db (#11906) --- .../connectors/database/oracle/airflow.md | 9 +++++++++ .../connectors/database/oracle/cli.md | 9 +++++++++ .../connectors/database/oracle/index.md | 1 + .../connections/database/oracleConnection.json | 5 +++++ .../ui/public/locales/en-US/Database/Oracle.md | 12 ++++++++++++ 5 files changed, 36 insertions(+) diff --git a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/airflow.md b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/airflow.md index 4490660b6aa..4d465105e1d 100644 --- a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/airflow.md +++ b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/airflow.md @@ -126,6 +126,12 @@ This is a sample config for Oracle: {% /codeInfo %} +{% codeInfo srNumber=32 %} + +**databaseName**: Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name. It is recommended to use the database name same as the SID, This ensures accurate results and proper identification of tables during profiling, data quality checks and dbt workflow. + +{% /codeInfo %} + #### Source Configuration - Source Config {% codeInfo srNumber=7 %} @@ -204,6 +210,9 @@ source: oracleServiceName: serviceName # databaseSchema: schema ``` +```yaml {% srNumber=32 %} + databaseName: custom_db_display_name +``` ```yaml {% srNumber=5 %} # connectionOptions: # key: value diff --git a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/cli.md b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/cli.md index dfaeb8130e3..30b9c0ef6fc 100644 --- a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/cli.md +++ b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/cli.md @@ -127,6 +127,12 @@ This is a sample config for Oracle: {% /codeInfo %} +{% codeInfo srNumber=23 %} + +**databaseName**: Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name. It is recommended to use the database name same as the SID, This ensures accurate results and proper identification of tables during profiling, data quality checks and dbt workflow. + +{% /codeInfo %} + #### Source Configuration - Source Config {% codeInfo srNumber=7 %} @@ -205,6 +211,9 @@ source: oracleServiceName: serviceName # databaseSchema: schema ``` +```yaml {% srNumber=23 %} + databaseName: custom_db_display_name +``` ```yaml {% srNumber=5 %} # connectionOptions: # key: value diff --git a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/index.md b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/index.md index 6212933f8f6..ad195bb0fc1 100644 --- a/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/index.md +++ b/openmetadata-docs/content/v1.1.0-snapshot/connectors/database/oracle/index.md @@ -205,6 +205,7 @@ desired. - **Username**: Specify the User to connect to Oracle. It should have enough privileges to read all the metadata. - **Password**: Password to connect to Oracle. - **Host and Port**: Enter the fully qualified hostname and port number for your Oracle deployment in the Host and Port field. +- **Database Name**: Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name. It is recommended to use the database name same as the SID, This ensures accurate results and proper identification of tables during profiling, data quality checks and dbt workflow. - **Oracle Connection Type** : Select the Oracle Connection Type. The type can either be `Oracle Service Name` or `Database Schema` - **Oracle Service Name**: The Oracle Service name is the TNS alias that you give when you remotely connect to your database and this Service name is recorded in tnsnames. - **Database Schema**: The name of the database schema available in Oracle that you want to connect with. diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json index 3aebc51987e..ba3bf9afa77 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json @@ -91,6 +91,11 @@ "description": "This directory will be used to set the LD_LIBRARY_PATH env variable. It is required if you need to enable thick connection mode. By default, we bring instant client 19 and point to /instantclient.", "default": "/instantclient" }, + "databaseName": { + "title": "Database Name", + "description": "Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name.", + "type": "string" + }, "connectionOptions": { "title": "Connection Options", "$ref": "../connectionBasicType.json#/definitions/connectionOptions" diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Oracle.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Oracle.md index 4a6827f4fed..f3365b008f2 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Oracle.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Oracle.md @@ -91,6 +91,18 @@ $$section This directory will be used to set the `LD_LIBRARY_PATH` env variable. It is required if you need to enable thick connection mode. By default, we bring Instant Client 19 and point to `/instantclient`. $$ +$$section +### Database Name $(id="databaseName") +In OpenMetadata, the Database Service hierarchy works as follows: +``` +Database Service > Database > Schema > Table +``` +In the case of Oracle, we won't have a Database as such. If you'd like to see your data in a database named something other than `default`, you can specify the name in this field. + +**Note:** It is recommended to use the database name same as the SID, This ensures accurate results and proper identification of tables during profiling, data quality checks and dbt workflow. + +$$ + $$section ### Connection Options $(id="connectionOptions")