From 5641e3d1acb93ff31892971e924f37c93b6f6893 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Wed, 21 Dec 2022 16:53:37 +0530 Subject: [PATCH] Change dbt label to lowecase and remove dbt remove dbt from Database service (#9447) --- .../e2e/AddNewService/redshiftWithDBT.spec.js | 4 ++-- .../components/Ingestion/Ingestion.component.tsx | 2 +- .../DBTConfigFormBuilder/DBTCloudConfig.tsx | 14 +++++++------- .../DBTConfigFormBuilder/DBTFormConstants.ts | 8 ++++---- .../common/DBTConfigFormBuilder/DBTGCSConfig.tsx | 8 ++++---- .../DBTConfigFormBuilder/DBTHttpConfig.tsx | 8 ++++---- .../DBTConfigFormBuilder/DBTLocalConfig.tsx | 12 ++++++------ .../common/DBTConfigFormBuilder/DBTS3Config.tsx | 4 ++-- .../SwitchField.component.tsx | 2 +- .../ui/src/constants/Ingestions.constant.ts | 2 +- .../ui/src/constants/Services.constant.ts | 2 +- .../ui/src/constants/service-guide.constant.ts | 16 +++++++++------- .../resources/ui/src/locale/languages/en-us.json | 11 ++++++----- .../AddIngestionPage.component.tsx | 4 +--- .../EditIngestionPage.component.tsx | 7 +++++-- .../resources/ui/src/utils/IngestionUtils.ts | 16 ++++++++++++---- 16 files changed, 66 insertions(+), 54 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js index df57c90dc95..a7e75056730 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js @@ -103,10 +103,10 @@ describe('RedShift Ingestion', () => { .should('be.visible') .click(); cy.get('[data-testid="list-item"]') - .contains('Add DBT Ingestion') + .contains('Add dbt Ingestion') .click(); //Add DBT ingestion - cy.contains('Add DBT Ingestion').should('be.visible'); + cy.contains('Add dbt Ingestion').should('be.visible'); cy.get('[data-testid="dbt-source"]') .should('be.visible') .select('HTTP Config Source'); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx index f5b2bfc4a47..0c6ae259b6f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Ingestion/Ingestion.component.tsx @@ -289,7 +289,7 @@ const Ingestion: React.FC = ({ case PipelineType.Dbt: name = t('label.add-workflow-ingestion', { - workflow: t('label.dbt-uppercase'), + workflow: t('label.dbt-lowercase'), }); break; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTCloudConfig.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTCloudConfig.tsx index 6ce1268e072..fc67697d147 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTCloudConfig.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTCloudConfig.tsx @@ -77,10 +77,10 @@ export const DBTCloudConfig: FunctionComponent = ({

- DBT cloud account Id. + dbt cloud account Id.

= ({

- DBT cloud account authentication token. + dbt cloud account authentication token.

= ({

- In case of multiple projects in a DBT cloud account, specify the - project's id from which you want to extract the DBT run artifacts + In case of multiple projects in a dbt cloud account, specify the + project's id from which you want to extract the dbt run artifacts

= [ ]; export const reqDBTCloudFields: Record = { - dbtCloudAccountId: 'DBT Cloud Account Id', - dbtCloudAuthToken: 'DBT Cloud Authentication Token', + dbtCloudAccountId: 'dbt Cloud Account Id', + dbtCloudAuthToken: 'dbt Cloud Authentication Token', }; export const reqDBTLocalFields: Record = { - dbtManifestFilePath: 'DBT Manifest File Path', + dbtManifestFilePath: 'dbt Manifest File Path', }; export const reqDBTHttpFields: Record = { - dbtManifestHttpPath: 'DBT Manifest Http Path', + dbtManifestHttpPath: 'dbt Manifest Http Path', }; export const reqDBTS3Fields: Record = { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTGCSConfig.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTGCSConfig.tsx index 20f56c20f59..cff3d7eaeac 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTGCSConfig.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/DBTGCSConfig.tsx @@ -370,10 +370,10 @@ export const DBTGCSConfig: FunctionComponent = ({

- Available sources to fetch DBT catalog and manifest files. + Available sources to fetch dbt catalog and manifest files.

= ({

- DBT manifest file path to extract dbt models and associate with + dbt manifest file path to extract dbt models and associate with tables.

= ({

- DBT catalog file to extract dbt models with their column schemas. + dbt catalog file to extract dbt models with their column schemas.

= ({

- DBT manifest file path to extract dbt models and associate with + dbt manifest file path to extract dbt models and associate with tables.

= ({

- DBT run results file path to extract the test results information. + dbt run results file path to extract the test results information.

= ({

Name of the bucket where the dbt files are stored. @@ -214,7 +214,7 @@ export const DBTS3Config: FunctionComponent = ({

Path of the folder where the dbt files are stored. diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/SwitchField.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/SwitchField.component.tsx index 3e0c4ce7ed6..5217768bdd1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/SwitchField.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DBTConfigFormBuilder/SwitchField.component.tsx @@ -44,7 +44,7 @@ function SwitchField({

- Optional configuration to update the description from DBT or not + Optional configuration to update the description from dbt or not

); diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/Ingestions.constant.ts b/openmetadata-ui/src/main/resources/ui/src/constants/Ingestions.constant.ts index c85a7e2bdaf..b1f23a69f12 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/Ingestions.constant.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/Ingestions.constant.ts @@ -24,7 +24,7 @@ export const STEPS_FOR_ADD_INGESTION: Array = [ }, { name: i18next.t('label.configure-entity', { - entity: i18next.t('label.dbt-uppercase'), + entity: i18next.t('label.dbt-lowercase'), }), step: 2, }, diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/Services.constant.ts b/openmetadata-ui/src/main/resources/ui/src/constants/Services.constant.ts index 38e661ce730..c2c8ab159fe 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/Services.constant.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/Services.constant.ts @@ -150,7 +150,7 @@ export const excludedService = [ MetadataServiceType.OpenMetadata, ]; -export const IGNORED_DB_SERVICES: Array = ['QueryLog']; +export const IGNORED_DB_SERVICES: Array = ['QueryLog', 'Dbt']; export const serviceTypes: Record> = { databaseServices: (Object.values(DatabaseServiceType) as string[]) diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/service-guide.constant.ts b/openmetadata-ui/src/main/resources/ui/src/constants/service-guide.constant.ts index 4c8e528b52b..45a38571f53 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/service-guide.constant.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/service-guide.constant.ts @@ -50,9 +50,9 @@ export const addMetadataIngestionGuide = [ }, { step: 2, - title: 'Configure DBT Model', - description: `A DBT model provides transformation logic that creates a table from raw data. Lineage traces the path of data across tables, but a DBT model provides specifics. - Select the required DBT source provider and fill in the mandatory fields. Integrate with DBT from OpenMetadata to view the models used to generate tables.`, + title: 'Configure dbt Model', + description: `A dbt model provides transformation logic that creates a table from raw data. Lineage traces the path of data across tables, but a dbt model provides specifics. + Select the required dbt source provider and fill in the mandatory fields. Integrate with dbt from OpenMetadata to view the models used to generate tables.`, }, { ...schedulingIngestionGuide, @@ -122,14 +122,16 @@ export const addProfilerIngestionGuide = [ export const addDBTIngestionGuide = [ { step: 2, - title: 'Add DBT Ingestion', - description: `A profiler workflow can be configured and deployed after a metadata ingestion has been set up. Multiple profiler pipelines can be set up for the same database service. - The pipeline feeds the Profiler tab of the Table entity, and also runs the tests configured for that entity. Add a Name, FQN, and define the filter pattern to start.`, + title: 'Add dbt Ingestion', + description: `A dbt workflow can be configured and deployed after a metadata ingestion has been set up. + Multiple dbt pipelines can be set up for the same database service. The pipeline feeds the dbt tab of the + Table entity, creates lineage from dbt nodes and adds tests from dbt. Add the source configuration of the + dbt files to start.`, }, { ...schedulingIngestionGuide }, { step: 5, - title: 'DBT Ingestion Added Successfully', + title: 'dbt Ingestion Added Successfully', description: 'You are all set! The has been successfully deployed. The profiler will run at a regular interval as per the schedule.', }, diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 977e3008f54..a21bdefccc5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -301,6 +301,7 @@ "chart-type": "Chart Type", "query-plural": "Queries", "dbt-uppercase": "DBT", + "dbt-lowercase": "dbt", "row-plural": "Rows", "columns-plural": "Columns", "algorithm": "Algorithm", @@ -397,7 +398,7 @@ "notification-plural": "Notifications", "view-all": "View all", "configure-ingestion": "Configure Ingestion", - "configure-dbt": "Configure DBT", + "configure-dbt": "Configure dbt", "configure-service": "Configure Service", "tables": "Tables", "topics": "Topics", @@ -555,7 +556,7 @@ "select-data-assets": "Select Data Assets", "profiler-timeout-seconds-label": "Timeout in Seconds", "add-deploy": "Add & Deploy", - "dbt-Configuration-source": "DBT Configuration Source", + "dbt-Configuration-source": "dbt Configuration Source", "select-dbt-source": "Select DBT Source", "no-selected-dbt": "No source selected for DBT Configuration.", "dbt": "DBT", @@ -599,7 +600,7 @@ "follower-plural": "Followers", "email-plural": "Emails", "no-tier": "No Tier", - "dbt-run-result-http-path": "DBT Run Results HTTP Path" + "dbt-run-result-http-path": "dbt Run Results HTTP Path" }, "message": { "service-email-required": "Service account Email is required", @@ -719,7 +720,7 @@ "advanced-search-message": "Discover the right data assets using the syntax editor with and/or conditions.", "profiler-timeout-seconds-message": "Optional number setting the timeout in seconds for the profiler. If the timeout is reached the profiler will wait for any pending queries to terminated its execution.", "instance-identifier": "Name that identifies this configuration instance uniquely.", - "fetch-dbt-files": "Available sources to fetch DBT catalog and manifest files.", + "fetch-dbt-files": "Available sources to fetch dbt catalog and manifest files.", "profile-sample-percentage-message": "Set the Profiler value as percentage", "profile-sample-row-count-message": " Set the Profiler value as row count", "no-profiler-enabled-summary-message": "Profiler is not enabled for the table.", @@ -728,7 +729,7 @@ "alerts-trigger-description": "Trigger for all data assets or a specific entity.", "alerts-filter-description": "Specify the change events to narrow the scope of your alerts.", "length-validator-error": "At least {{length}} {{field}} required", - "dbt-run-result-http-path-message": "DBT run results http path to extract the test results information." + "dbt-run-result-http-path-message": "dbt run results http path to extract the test results information." }, "server": { "you-have-not-action-anything-yet": "You have not {{action}} anything yet.", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx index 484e42af159..7712a3cd54c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx @@ -233,9 +233,7 @@ const AddIngestionPage = () => { activeTitle: true, }, { - name: t('label.add-workflow-ingestion', { - workflow: startCase(ingestionType), - }), + name: getIngestionHeadingName(ingestionType, INGESTION_ACTION_TYPE.ADD), url: '', activeTitle: true, }, diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx index 98fd58cabce..b63336612c2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx @@ -13,7 +13,7 @@ import { Space } from 'antd'; import { AxiosError } from 'axios'; -import { capitalize, startCase } from 'lodash'; +import { startCase } from 'lodash'; import { ServiceTypes } from 'Models'; import React, { useEffect, useState } from 'react'; import { useHistory, useParams } from 'react-router-dom'; @@ -269,7 +269,10 @@ const EditIngestionPage = () => { activeTitle: true, }, { - name: `Edit ${capitalize(ingestionType)} Ingestion`, + name: getIngestionHeadingName( + ingestionType, + INGESTION_ACTION_TYPE.EDIT + ), url: '', activeTitle: true, }, diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/IngestionUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/IngestionUtils.ts index 7a43bfac4c2..d7ba7582bc6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/IngestionUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/IngestionUtils.ts @@ -13,17 +13,25 @@ import { t } from 'i18next'; -import { capitalize, upperCase } from 'lodash'; -import { INGESTION_ACTION_TYPE } from '../constants/Ingestions.constant'; +import { + INGESTION_ACTION_TYPE, + PIPELINE_TYPE_LOCALISATION, +} from '../constants/Ingestions.constant'; import { PipelineType } from '../generated/api/services/ingestionPipelines/createIngestionPipeline'; export const getIngestionHeadingName = ( ingestionType: string, type: string ) => { - let ingestionName = capitalize(ingestionType); + let ingestionName = t( + `label.${ + PIPELINE_TYPE_LOCALISATION[ + ingestionType as keyof typeof PIPELINE_TYPE_LOCALISATION + ] + }` + ); if (ingestionType === PipelineType.Dbt) { - ingestionName = upperCase(ingestionType); + ingestionName = t('label.dbt-lowercase'); } return type === INGESTION_ACTION_TYPE.ADD