From fa39f2732aa864fb26a6799bcac5df12b71dbe2f Mon Sep 17 00:00:00 2001 From: Ayush Shah Date: Fri, 21 Apr 2023 20:20:13 +0530 Subject: [PATCH] Mssql docs (#11196) --- .../connectors/database/mssql/airflow.md | 9 ++++ .../v1.0.0/connectors/database/mssql/cli.md | 9 ++++ .../v1.0.0/connectors/database/mssql/index.md | 9 ++++ .../connections/database/mssqlConnection.md | 2 +- .../content/connectors/database/mssql/cli.md | 10 ++++ .../connectors/database/mssql/index.md | 10 ++++ .../connections/database/mssqlConnection.md | 2 +- .../ui/public/locales/en-US/Database/Mssql.md | 46 ++++++++++++------- 8 files changed, 78 insertions(+), 19 deletions(-) diff --git a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/airflow.md b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/airflow.md index a2b0e5cf65f..8b97a55f6ff 100644 --- a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/airflow.md +++ b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/airflow.md @@ -46,6 +46,15 @@ To deploy OpenMetadata, check the Deployment guides. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` ### Python Requirements To run the MSSQL ingestion, you will need to install: diff --git a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/cli.md b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/cli.md index 18ba65eb4ac..1b68d541472 100644 --- a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/cli.md +++ b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/cli.md @@ -46,6 +46,15 @@ To deploy OpenMetadata, check the Deployment guides. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` ### Python Requirements To run the MSSQL ingestion, you will need to install: diff --git a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/index.md b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/index.md index 11465d64869..6f01f310c7e 100644 --- a/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/index.md +++ b/openmetadata-docs-v1/content/v1.0.0/connectors/database/mssql/index.md @@ -66,6 +66,15 @@ To deploy OpenMetadata, check the Deployment guides. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` ### For Remote Connection #### 1. SQL Server running diff --git a/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md b/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md index 6d8c6dd09df..28e777042d3 100644 --- a/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md +++ b/openmetadata-docs-v1/content/v1.0.0/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md @@ -11,7 +11,7 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab - **`type`**: Service Type. Refer to *#/definitions/mssqlType*. Default: `Mssql`. - **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/mssqlScheme*. Default: `mssql+pytds`. -- **`username`** *(string)*: Username to connect to MSSQL. This user should have privileges to read all the metadata in MsSQL. +- **`username`** *(string)*: Username to connect to MSSQL. This user should have privileges to read all the metadata in MSSQL. - **`password`** *(string)*: Password to connect to MSSQL. - **`hostPort`** *(string)*: Host and port of the MSSQL service. - **`database`** *(string)*: Database of the data source. This is optional parameter, if you would like to restrict the metadata reading to a single database. When left blank, OpenMetadata Ingestion attempts to scan all the databases. diff --git a/openmetadata-docs/content/connectors/database/mssql/cli.md b/openmetadata-docs/content/connectors/database/mssql/cli.md index da25fd56d99..3c59565955b 100644 --- a/openmetadata-docs/content/connectors/database/mssql/cli.md +++ b/openmetadata-docs/content/connectors/database/mssql/cli.md @@ -39,6 +39,16 @@ To deploy OpenMetadata, check the Deployment guides. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. + +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` ### Python Requirements To run the MSSQL ingestion, you will need to install: diff --git a/openmetadata-docs/content/connectors/database/mssql/index.md b/openmetadata-docs/content/connectors/database/mssql/index.md index 8ccc4ed66a5..54402519980 100644 --- a/openmetadata-docs/content/connectors/database/mssql/index.md +++ b/openmetadata-docs/content/connectors/database/mssql/index.md @@ -61,6 +61,16 @@ To deploy OpenMetadata, check the Deployment guides. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` + ### For Remote Connection #### 1. SQL Server running diff --git a/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md b/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md index 6d8c6dd09df..28e777042d3 100644 --- a/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md +++ b/openmetadata-docs/content/main-concepts/metadata-standard/schemas/entity/services/connections/database/mssqlConnection.md @@ -11,7 +11,7 @@ slug: /main-concepts/metadata-standard/schemas/entity/services/connections/datab - **`type`**: Service Type. Refer to *#/definitions/mssqlType*. Default: `Mssql`. - **`scheme`**: SQLAlchemy driver scheme options. Refer to *#/definitions/mssqlScheme*. Default: `mssql+pytds`. -- **`username`** *(string)*: Username to connect to MSSQL. This user should have privileges to read all the metadata in MsSQL. +- **`username`** *(string)*: Username to connect to MSSQL. This user should have privileges to read all the metadata in MSSQL. - **`password`** *(string)*: Password to connect to MSSQL. - **`hostPort`** *(string)*: Host and port of the MSSQL service. - **`database`** *(string)*: Database of the data source. This is optional parameter, if you would like to restrict the metadata reading to a single database. When left blank, OpenMetadata Ingestion attempts to scan all the databases. diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Mssql.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Mssql.md index 5626c2a557f..0c676837ab9 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Mssql.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Database/Mssql.md @@ -7,6 +7,22 @@ In this section, we provide guides and references to use the Mssql connector. To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. +MSSQL User must grant `SELECT` privilege to fetch the metadata of tables and views. + +```sql +-- Create a new user +-- More details https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver16 +CREATE USER Mary WITH PASSWORD = '********'; +-- Grant SELECT on table +GRANT SELECT TO Mary; +``` + +### Profiler & Data Quality +Executing the profiler worflow or data quality tests, will require the user to have `SELECT` permission on the tables/schemas where the profiler/tests will be executed. More information on the profiler workflow setup can be found [here](https://docs.open-metadata.org/connectors/ingestion/workflows/profiler) and data quality tests [here](https://docs.open-metadata.org/connectors/ingestion/workflows/data-quality). + +### Usage & Lineage +For the usage and lineage workflow, the user will need `SELECT` privilege table. You can find more information on the usage workflow [here](https://docs.open-metadata.org/connectors/ingestion/workflows/usage) and the lineage workflow [here](https://docs.open-metadata.org/connectors/ingestion/workflows/lineage). + ### For Remote Connection #### 1. SQL Server running @@ -43,14 +59,17 @@ For details step please refer the this [link](https://docs.microsoft.com/en-us/s $$section ### Scheme $(id="scheme") - -SQLAlchemy driver scheme options. +There are three schemes based on the user's requirement to fetch data from MSSQL: +- **mssql+pytds**: High-performance open-source library for connecting to Microsoft SQL Server. +- **mssql+pyodbc**: Cross-platform Python library that uses ODBC to connect to Microsoft SQL Server. +- *mssql+pymssql**: Python library that uses FreeTDS to connect to Microsoft SQL Server, with support for bulk data transfer and query timeouts. $$ $$section ### Username $(id="username") -Username to connect to MSSQL. This user should have privileges to read all the metadata in MsSQL. +Username to connect to MSSQL. +This user should have privileges to read all the metadata in MSSQL. $$ $$section @@ -62,8 +81,7 @@ $$ $$section ### Host Port $(id="hostPort") -Host and port of the MSSQL service. -Example: `localhost:1433` +The hostPort parameter specifies the host and port of the MSSQL instance. This should be specified as a string in the format `http://hostname:port` or `https://hostname:port`. For example, you might set the hostPort parameter to `https://:3000`. $$ $$section @@ -75,26 +93,20 @@ $$ $$section ### Uri String $(id="uriString") -Connection URI In case of pyodbc +Connection URI String to connect with MSSQL. It only works with `pyodbc` scheme. +Example: `DRIVER={ODBC Driver 17 for SQL Server};SERVER=server_name;DATABASE=db_name;UID=user_name;PWD=password`. $$ $$section ### Connection Options $(id="connectionOptions") Additional connection options to build the URL that can be sent to service during the connection. - $$ $$section ### Connection Arguments $(id="connectionArguments") -Additional connection arguments such as security or protocol configs that can be sent to service during connection. - -$$ - -$$section -### Supports Database $(id="supportsDatabase") - -The source service supports the database concept in its hierarchy - -$$ +Enter the details for any additional connection arguments such as security or protocol configs that can be sent to MSSQL during the connection. These details must be added as Key-Value pairs. +- In case you are using Single-Sign-On (SSO) for authentication, add the authenticator details in the Connection Arguments as a Key-Value pair as follows: "authenticator" : "sso_login_url". +- In case you authenticate with SSO using an external browser popup, then add the authenticator details in the Connection Arguments as a Key-Value pair as follows: "authenticator" : "externalbrowser". +$$ \ No newline at end of file