<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deploying DJ on</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/deploying-dj/</link><description>Recent content in Deploying DJ on</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/deploying-dj/index.xml" rel="self" type="application/rss+xml"/><item><title>Overview</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/overview/</guid><description>The Components of a DJ Deployment # A full DJ deployment consists of the following services:
Core API UI Postgres DB (for storing metadata) Query Service Reflection Service Materialization Service (optional) flowchart LR classDef coreAPI fill:#ffc9c9,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef UI fill:#99e9f2,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef db fill:#b2f2bb,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef reflection fill:#d0bfff,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef query fill:#ffec99,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef clients fill:#e3fafc,stroke:#000,stroke-width:2px,color:#000,font-size:22px subgraph DataLayer[&amp;#34;Data Layer&amp;#34;] direction TB DataWarehouse[&amp;#34;Data Warehouse&amp;#34;] Scheduler[&amp;#34;Scheduler&amp;#34;] end subgraph &amp;#34;DataJunction&amp;#34; direction TB CoreAPI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Core API&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::coreAPI MetadataDB[&amp;#34;Metadata DB&amp;lt;br&amp;gt;(Postgres)&amp;#34;]:::db QueryService[&amp;#34;Query&amp;lt;br&amp;gt;Service&amp;#34;]:::query ReflectionService[&amp;#34;Reflection&amp;lt;br&amp;gt;Service&amp;#34;]:::reflection subgraph Clients[&amp;#34;Client Libraries&amp;#34;] PythonClient[&amp;#34;Python Client&amp;#34;]:::clients JSClient[&amp;#34;JS Client&amp;#34;]:::clients end UI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;DJ UI&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::UI end subgraph &amp;#34;Presentation Layer&amp;#34; direction TB JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] Streamlit[&amp;#34;Streamlit&amp;#34;] ReactApps[&amp;#34;React Apps&amp;#34;] Tableau[&amp;#34;Tableau&amp;#34;] end CoreAPI &amp;lt;--&amp;gt; MetadataDB CoreAPI &amp;lt;--&amp;gt; UI CoreAPI --&amp;gt; PythonClient[&amp;#34;Python Client&amp;#34;] CoreAPI --&amp;gt; JSClient[&amp;#34;JS Client&amp;#34;] DataWarehouse --&amp;gt; QueryService Scheduler --&amp;gt; QueryService ReflectionService --&amp;gt; CoreAPI QueryService &amp;lt;--&amp;gt; CoreAPI DataWarehouse --&amp;gt; ReflectionService PythonClient --&amp;gt; JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] PythonClient --&amp;gt; Streamlit[&amp;#34;Streamlit&amp;#34;] JSClient --&amp;gt; ReactApps[&amp;#34;React Apps&amp;#34;]</description></item><item><title>Running a DJ Server</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/running-a-dj-server/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/running-a-dj-server/</guid><description>Running the core DJ Server # This guide walks through configuring and running a DJ (DataJunction) server.
Configuration # DJ uses Pydantic to manage configuration, with support for environment variables (including nested variables using __ as a delimiter). The Settings class controls server behavior, and each setting can be overridden via environment variables or configuration files.
Below is a list of all useful server settings.
Core Server Settings # Setting Type Default Description query_service str | None None Optional external query service URL.</description></item><item><title>Query Service</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/query-service/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/query-service/</guid><description>flowchart LR classDef coreAPI stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef UI stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef db stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef reflection stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef query fill:#ffec99,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef clients stroke:#000,stroke-width:2px,color:#000,font-size:22px subgraph DataLayer[&amp;#34;Data Layer&amp;#34;] direction TB DataWarehouse[&amp;#34;Data Warehouse&amp;#34;] Scheduler[&amp;#34;Scheduler&amp;#34;] end subgraph &amp;#34;DataJunction&amp;#34; direction TB CoreAPI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Core API&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::coreAPI MetadataDB[&amp;#34;Metadata DB&amp;lt;br&amp;gt;(Postgres)&amp;#34;]:::db QueryService[&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Query&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Service&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;]:::query ReflectionService[&amp;#34;Reflection&amp;lt;br&amp;gt;Service&amp;#34;]:::reflection subgraph Clients[&amp;#34;Client Libraries&amp;#34;] PythonClient[&amp;#34;Python Client&amp;#34;]:::clients JSClient[&amp;#34;JS Client&amp;#34;]:::clients end UI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;DJ UI&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::UI end subgraph &amp;#34;Presentation Layer&amp;#34; direction TB JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] Streamlit[&amp;#34;Streamlit&amp;#34;] ReactApps[&amp;#34;React Apps&amp;#34;] Tableau[&amp;#34;Tableau&amp;#34;] end CoreAPI &amp;lt;--&amp;gt; MetadataDB CoreAPI &amp;lt;--&amp;gt; UI CoreAPI --&amp;gt; PythonClient[&amp;#34;Python Client&amp;#34;] CoreAPI --&amp;gt; JSClient[&amp;#34;JS Client&amp;#34;] DataWarehouse --&amp;gt; QueryService Scheduler --&amp;gt; QueryService ReflectionService --&amp;gt; CoreAPI QueryService &amp;lt;--&amp;gt; CoreAPI DataWarehouse --&amp;gt; ReflectionService PythonClient --&amp;gt; JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] PythonClient --&amp;gt; Streamlit[&amp;#34;Streamlit&amp;#34;] JSClient --&amp;gt; ReactApps[&amp;#34;React Apps&amp;#34;] The query service is responsible for the execution of data retrieval queries against the underlying data sources.</description></item><item><title>Reflection Service</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/reflection-service/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/reflection-service/</guid><description>flowchart LR classDef coreAPI stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef UI stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef db stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef reflection fill:#ffec99,stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef query stroke:#000,stroke-width:2px,color:#000,font-size:22px classDef clients stroke:#000,stroke-width:2px,color:#000,font-size:22px subgraph DataLayer[&amp;#34;Data Layer&amp;#34;] direction TB DataWarehouse[&amp;#34;Data Warehouse&amp;#34;] Scheduler[&amp;#34;Scheduler&amp;#34;] end subgraph &amp;#34;DataJunction&amp;#34; direction TB CoreAPI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Core API&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::coreAPI MetadataDB[&amp;#34;Metadata DB&amp;lt;br&amp;gt;(Postgres)&amp;#34;]:::db QueryService[&amp;#34;Query&amp;lt;br&amp;gt;Service&amp;#34;]:::query ReflectionService[&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Reflection&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;Service&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;]:::reflection subgraph Clients[&amp;#34;Client Libraries&amp;#34;] PythonClient[&amp;#34;Python Client&amp;#34;]:::clients JSClient[&amp;#34;JS Client&amp;#34;]:::clients end UI(&amp;#34;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;DJ UI&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;#34;):::UI end subgraph &amp;#34;Presentation Layer&amp;#34; direction TB JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] Streamlit[&amp;#34;Streamlit&amp;#34;] ReactApps[&amp;#34;React Apps&amp;#34;] Tableau[&amp;#34;Tableau&amp;#34;] end CoreAPI &amp;lt;--&amp;gt; MetadataDB CoreAPI &amp;lt;--&amp;gt; UI CoreAPI --&amp;gt; PythonClient[&amp;#34;Python Client&amp;#34;] CoreAPI --&amp;gt; JSClient[&amp;#34;JS Client&amp;#34;] DataWarehouse --&amp;gt; QueryService Scheduler --&amp;gt; QueryService ReflectionService --&amp;gt; CoreAPI QueryService &amp;lt;--&amp;gt; CoreAPI DataWarehouse --&amp;gt; ReflectionService PythonClient --&amp;gt; JupyterNotebooks[&amp;#34;Jupyter Notebooks&amp;#34;] PythonClient --&amp;gt; Streamlit[&amp;#34;Streamlit&amp;#34;] JSClient --&amp;gt; ReactApps[&amp;#34;React Apps&amp;#34;] The reflection service polls the DJ core service for all nodes with associated tables, whether source tables or materialized tables.</description></item><item><title>Caching</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/caching/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/caching/</guid><description>In DataJunction, caching is a crucial component that helps optimize performance by storing and reusing results of expensive operations, such as computing the dimension DAG (Directed Acyclic Graph). This section discusses how caching is used within DataJunction and how you can implement a custom caching solution using FastAPI&amp;rsquo;s dependency injection.
How Caching is Used # DataJunction employs caching in multiple areas to enhance performance and reduce the load on the database.</description></item><item><title>SQL Plugins</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/sql-plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/sql-plugins/</guid><description>DataJunction has a flexible SQL transpilation plugin system that enables you to add support for transpiling SQL queries across any SQL dialects. By default, support is enabled for Spark SQL, Trino, and Druid. You can also add custom transpilation plugins by following the instructions below.
1. Create the Plugin Class
Subclass SQLTranspilationPlugin, and register it with the dialect(s) it supports using the @dialect_plugin decorator:
@dialect_plugin(&amp;#34;customdb&amp;#34;) class CustomDBTranspilationPlugin(SQLTranspilationPlugin): package_name: str = &amp;#34;customdb-sql&amp;#34; def transpile_sql( self, query: str, *, input_dialect: Optional[Dialect] = None, output_dialect: Optional[Dialect] = None, ) -&amp;gt; str: import customdb_sql # Ensure the library is installed # Ex: use the custom library’s transpilation interface return customdb_sql.</description></item><item><title>Notifications</title><link>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/notifications/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://6a024bf2a7e6a60008bd1284--thriving-cassata-78ae72.netlify.app/docs/0.1.0/deploying-dj/notifications/</guid><description>In DataJunction, notifications are crucial for keeping users informed about various activities, such as changes in the state of nodes. This document outlines how notifications are managed within DataJunction and how you can implement a custom notification solution using FastAPI&amp;rsquo;s dependency injection.
How Notifications are Used # DataJunction uses notifications to alert users about significant events, such as updates to nodes or changes in their state. By handling notifications within the OSS project, DataJunction provides an opinionated take on where and when notifications should be sent.</description></item></channel></rss>