Package: dbt-extrica
dbt-extricaThedbt-extricaadapter allows users to interact withExtrica'sTrino Engine, a distributed SQL query engine, using dbt.
This adapter is designed to facilitate the use of dbt for transforming and modeling data within Extrica.FeaturesExtrica Compatibility:Compatible with Extrica's Trino Query Engine, allowing users to leverage dbt within Extrica.JWT Authentication:Utilizes JWT for secure authentication with Extrica. The adapter handles the generation of JWT tokens behind the scenes via username and password configured in profiles.yml.Extrica eliminatescomplex data-engineeringand de-couples migrations to help businesses experience a quantum leap in the insights.DescriptionAbout DBTdbt (data build tool) is a powerful data transformation workflow tool that facilitates quick and collaborative deployment of analytics code. It follows software engineering best practices such as modularity, continuous integration/deployment (CI/CD), testing, and documentation. With dbt, individuals familiar with SQL can easily build production-grade data pipelines.Connecting to Multiple Data SourcesChallenges in Limited ConnectivityDefault configurations in dbt make it challenging to connect to databases beyond the primary one associated with the project.
Many organizations deal with diverse data sources, such as Oracle, Snowflake, SQL Server, Google BigQuery, Delta Lake, Iceberg, AWS Redshift, Vertica, Azure Synapse, MongoDB, AWS S3 and other data sources.
Integrating and transforming data from these varied sources efficiently becomes essential for comprehensive analytics.Solution: Leveraging Trino and Catalogs in ExtricaExtrica's Trino is an advanced query engine that excels in federated queries across multiple data sources and also allows the writeback capabilities to variety of data sources.
Its ability to connect to various databases and process SQL queries at scale makes it an ideal solution for organizations dealing with diverse data sources.Extrica, built on Trino introduces the concept of catalogs to address the challenge of connecting to multiple data sources seamlessly within dbt.
Each catalog corresponds to a specific data source, enabling a unified approach to managing and transforming data across various systems.Connecting to ExtricaExample profiles.ymlHere is a  example of a dbt-extrica profile parameters. At a minimum, you need to specifytype,method,username,passwordhost,port,schema,catalogandthreads.<profile-name>:outputs:dev:type:extricamethod:jwtusername:[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:extricamethod:jwtusername:[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:devDescription of Profile FieldsParameterTypeDescriptiontypestringSpecifies the type of dbt adapter (Extrica).methodjwtAuthentication method for JWT authentication.usernamestringUsername for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object.passwordstringPassword for JWT authentication. The obtained JWT token is used to initialize a trino.auth.JWTAuthentication object.hoststringThe host parameter specifies the hostname or IP address of the Trino server.portintegerThe port parameter specifies the port number on which the Trino server is listening.schemastringSchema or database name for the connection.catalogstringName of the catalog representing the data source.threadsintegerNumber of threads for parallel execution of queries. (1 or moreGetting StartedInstall dbt-extrica adapterpipinstalldbt-extricaInitialize dbt projectdbtinitSelect Adapters: After running thedbt initcommand, 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.ymlOpen 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.Check connection is successfuldbtdebugTo run all models use below commanddbtrun