diff --git a/website/docs/docs/community-adapters.md b/website/docs/docs/community-adapters.md index d1e63f03128..1faf2fd9e25 100644 --- a/website/docs/docs/community-adapters.md +++ b/website/docs/docs/community-adapters.md @@ -17,4 +17,4 @@ Community adapters are adapter plugins contributed and maintained by members of | [TiDB](/docs/core/connect-data-platform/tidb-setup) | [Firebolt](/docs/core/connect-data-platform/firebolt-setup) | [MindsDB](/docs/core/connect-data-platform/mindsdb-setup) | [Vertica](/docs/core/connect-data-platform/vertica-setup) | [AWS Glue](/docs/core/connect-data-platform/glue-setup) | [MySQL](/docs/core/connect-data-platform/mysql-setup) | | [Upsolver](/docs/core/connect-data-platform/upsolver-setup) | [Databend Cloud](/docs/core/connect-data-platform/databend-setup) | [fal - Python models](/docs/core/connect-data-platform/fal-setup) | -| [TimescaleDB](https://dbt-timescaledb.debruyn.dev/) | | | +| [TimescaleDB](https://dbt-timescaledb.debruyn.dev/) | [Extrica](/docs/core/connect-data-platform/extrica-setup) | | diff --git a/website/docs/docs/core/connect-data-platform/extrica-setup.md b/website/docs/docs/core/connect-data-platform/extrica-setup.md new file mode 100644 index 00000000000..3060aaa7369 --- /dev/null +++ b/website/docs/docs/core/connect-data-platform/extrica-setup.md @@ -0,0 +1,87 @@ +--- +title: "Extrica Setup" +description: "Read this guide to learn about the Extrica Trino Query Engine setup in dbt." +id: "extrica-setup" +meta: + maintained_by: Extrica, Trianz + authors: Gaurav Mittal, Viney Kumar, Mohammed Feroz, and Mrinal Mayank + github_repo: 'extricatrianz/dbt-extrica' + pypi_package: 'dbt-extrica' + min_core_version: 'v1.7.2' + cloud_support: 'Not Supported' + min_supported_version: 'n/a' + platform_name: 'Extrica' + config_page: '/reference/resource-configs/extrica-configs' +--- +

Overview of {frontMatter.meta.pypi_package}

+ + +

Installing {frontMatter.meta.pypi_package}

+ +Use `pip` to install the adapter, which automatically installs `dbt-core` and any additional dependencies. Use the following command for installation: + +python -m pip install {frontMatter.meta.pypi_package} + +

Configuring {frontMatter.meta.pypi_package}

+ +

For {frontMatter.meta.platform_name}-specifc configuration please refer to {frontMatter.meta.platform_name} Configuration

+ + +

Connecting to {frontMatter.meta.platform_name}

+ +#### Example profiles.yml +Here is a example of a dbt-extrica profile parameters. At a minimum, you need to specify `type`, `method`, `username`, `password` `host`, `port`, `schema`, `catalog` and `threads`. + + +```yaml +: + outputs: + dev: + type: extrica + method: jwt + username: [username for jwt auth] + password: [password for jwt auth] + host: [extrica hostname] + port: [port number] + schema: [dev_schema] + catalog: [catalog_name] + threads: [1 or more] + + prod: + type: extrica + method: jwt + username: [username for jwt auth] + password: [password for jwt auth] + host: [extrica hostname] + port: [port number] + schema: [dev_schema] + catalog: [catalog_name] + threads: [1 or more] + target: dev + +``` + + +#### Description of Extrica Profile Fields + +| Parameter | Type | Description | +|------------|----------|------------------------------------------| +| type | string | Specifies the type of dbt adapter (Extrica). | +| method | jwt | Authentication method for JWT authentication. | +| username | string | Username for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object. | +| password | string | Password for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object. | +| host | string | The host parameter specifies the hostname or IP address of the Extrica's Trino server. | +| port | integer | The port parameter specifies the port number on which the Extrica's Trino server is listening. | +| schema | string | Schema or database name for the connection. | +| catalog | string | Name of the catalog representing the data source. | +| threads | integer | Number of threads for parallel execution of queries. (1 or more | + +

For further info, refer to the GitHub repository: {frontMatter.meta.github_repo}

diff --git a/website/docs/reference/resource-configs/extrica-configs.md b/website/docs/reference/resource-configs/extrica-configs.md new file mode 100644 index 00000000000..b2fd0a368f2 --- /dev/null +++ b/website/docs/reference/resource-configs/extrica-configs.md @@ -0,0 +1,98 @@ +--- +title: "Extrica configurations" +id: "extrica-configs" +--- +## Configuring Extrica + +#### Install dbt-extrica adapter + +```sh + pip install dbt-extrica +``` +#### Initialize dbt project +```sh +dbt init +``` +* Select Adapters : After running the `dbt init` command, you'll be prompted to select adapters from a list of available adapters. Choose the appropriate adapter for your project. +* Modify Profiles.yml : The dbt init command will create a project structure in current dir and a .dbt folder inside users of your system. Inside .dbt folder, you'll find a profiles.yml file. + +#### Configure Profiles.yml +* Open the profiles.yml file in a text editor. +* Locate the section for your selected adapter and project (e.g., extrica). +* Add the necessary connection details such as host, port, user, password, etc. +* Save and close the profiles.yml file. + +#### Example profiles.yml +Here is a example of a dbt-extrica profile parameters. At a minimum, you need to specify `type`, `method`, `username`, `password` `host`, `port`, `schema`, `catalog` and `threads`. + + +```yaml +: + outputs: + dev: + type: extrica + method: jwt + username: [username for jwt auth] + password: [password for jwt auth] + host: [extrica hostname] + port: [port number] + schema: [dev_schema] + catalog: [catalog_name] + threads: [1 or more] + + prod: + type: extrica + method: jwt + username: [username for jwt auth] + password: [password for jwt auth] + host: [extrica hostname] + port: [port number] + schema: [dev_schema] + catalog: [catalog_name] + threads: [1 or more] + target: dev + +``` + + +#### Check connection is successful +```sh +dbt debug +``` +#### To run all models use below command +```sh +dbt run +``` +## Model Example: +This dbt model demonstrates a basic transformation workflow, starting with the selection of relevant columns from +the table. The SELECT statement combines the results to present the final transformed data. + + +```sql +{{ config(materialized='table') }} + +with customer_insurance_data as ( + +SELECT + hospital_sales.sale_id_en, + hospital_sales.sales_date, + hospital_sales.hospital_id_en, + hospital_sales.product_id_en, + customer_insurance.customerid, + customer_insurance.gender, + customer_insurance.annual_premium_cost +FROM + orarcle112.annuity.hospital_product_sales_encrypt_csv hospital_sales +INNER JOIN + orarcle112.annuity.insurance_customer_encrypt_csv customer_insurance +ON + hospital_sales.hospital_id_en = customer_insurance.hospital_id_en +) + +select * +from customer_insurance_data +``` + + + + diff --git a/website/sidebars.js b/website/sidebars.js index 598fffc7f0d..81605490e01 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -213,6 +213,7 @@ const sidebarSettings = { "docs/core/connect-data-platform/decodable-setup", "docs/core/connect-data-platform/upsolver-setup", "docs/core/connect-data-platform/starrocks-setup", + "docs/core/connect-data-platform/extrica-setup", ], }, ], @@ -723,6 +724,7 @@ const sidebarSettings = { "reference/resource-configs/oracle-configs", "reference/resource-configs/upsolver-configs", "reference/resource-configs/starrocks-configs", + "reference/resource-configs/extrica-configs", ], }, {