sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
076f25e7e0d2bb76e43916f7a66ec830a1b53cc24611be70cc1f5784bc016c74 | Rust | 4,931 | 145 | use std::path::Path;
use dbt_common::tracing::dbt_emit::emit_info_log_message;
use dbt_common::tracing::span_info::find_and_update_span_attrs;
use dbt_common::{ErrorCode, FsResult, constants::DBT_PACKAGES_LOCK_FILE, fs_err};
use dbt_schemas::schemas::packages::{DbtPackageLock, DbtPackagesLock};
use dbt_telemetry::Deps... |
a1fcdd051da74af1cb419c0d6bdcf6eb68c64b6e4265ed42d4e9553c8554267e | Rust | 4,938 | 145 | use dbt_common::{AdapterError, AdapterResult};
use dbt_schemas::schemas::{DbtModel, InternalDbtNodeAttributes};
use minijinja::Value;
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, diff, impl_loader,
};
use crate::relation::snowflake::config::{
SnowflakeDes... |
34d0993a296ad9a476da21b21e1569714f7e83892135cd2544f21e378bc27f16 | Rust | 4,948 | 142 | use super::common::{ConfigField, ConfigProcessor, FieldValue, InteractiveSetup};
use dbt_common::FsResult;
use dbt_schemas::schemas::profiles::DatabricksDbConfig;
use dbt_schemas::schemas::serde::StringOrInteger;
impl InteractiveSetup for DatabricksDbConfig {
fn get_fields() -> Vec<ConfigField> {
vec![
... |
bdcac4667d67f55f99dab7c111441e0c1ca81aa44d59bb778a68c0e84a0875a4 | Rust | 4,991 | 93 | // Names of Database options --------------------------------------------
pub const DATABASE: &str = "adbc.snowflake.sql.db";
pub const SCHEMA: &str = "adbc.snowflake.sql.schema";
pub const WAREHOUSE: &str = "adbc.snowflake.sql.warehouse";
pub const ROLE: &str = "adbc.snowflake.sql.role";
pub const REGION: &str = "adb... |
b34b66a5e627986065852b286d648f35b24012e2b08b30dc12900e93581b586b | Rust | 5,014 | 136 | //! Weight learning for the vectorised deep-network backend, mirroring
//! `pyhgf/updates/vectorised/learning.py`.
//!
//! The per-layer weight gradient is a rank-one (outer) product of a child-side
//! factor (the value prediction error, optionally scaled by the child's
//! posterior precision) and a parent-side facto... |
464a0d88599f709af90d1dc9c8d956680c6953fd06ef1302b334e1fca9b6be88 | Rust | 5,040 | 139 | //! `--writeMappings` SAM output.
//!
//! SAM is the plain-text alignment format: one tab-separated line per placed
//! read, after a header describing the references. Every field here is derived by
//! [`crate::mapping_record`], which BAM output shares, so this file is purely the
//! text encoding.
use std::fmt::Writ... |
be2de54d982a380de8304c58e396e82ed7093b3f58104c5b07a56813ad40ae16 | Rust | 5,044 | 144 | //! Decoys must be excluded from the reported rows *and* cost no bias-correction
//! work (#1140 follow-up). Lives in salmon-cli because it drives the real
//! binary end to end: `CARGO_BIN_EXE_salmon` is only defined for tests in the
//! crate that builds the binary.
use std::process::Command;
const SALMON: &str = e... |
a0dcfd084ed609ee19959f8704e1cbba55bea5d68cc5b19e5615ac8599c81c29 | Rust | 5,059 | 130 | //! Macro resolution when one environment serves several adapters.
//!
//! Two properties have to hold together, and neither is provable from a
//! single-adapter harness:
//!
//! * *intra-chain overriding is preserved* — an `lake_compute` node gets DuckDB's
//! `run_hooks`, which overrides `dbt-adapters`' by being l... |
77815ba0b23220f249c9dc7eee0bec3304244d407d3a227fd68abef62767a9fb | Rust | 5,068 | 137 | use crate::compiler::instructions::Instruction;
use crate::types::iterable::IterableType;
use crate::types::list::ListType;
use crate::types::struct_::StructType;
use crate::types::Type;
use crate::value::argtypes::KwargsValues;
use crate::value::{Value, ValueKind};
use std::collections::BTreeMap;
use std::fmt;
use std... |
0b9eaee33166e5e9e55a86fe403ac156d34bf45f2036bb7e8221d7e68616a6ed | Rust | 5,082 | 160 | use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum ProfileError {
#[error("{}", not_found_message(.searched, .explicit_profiles_dir))]
NotFound {
searched: Vec<PathBuf>,
/// True when `--profiles-dir` was explicitly set, restricting the search.
explicit_profiles_dir: bo... |
0f9254c7abd8961cad96d0a73a35793a46318c015a084f317232039c656653d4 | Rust | 5,090 | 153 | //! `preview` is accepted as an alias for `rc` — both translate to PEP 440 `rcN`.
use anyhow::{Result, anyhow, bail};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum PreReleaseLane {
Alpha,
Beta,
Rc,
Dev,
}
impl PreReleaseLane {
fn parse(s: &str) -> Option<Self> {
Some(match ... |
df30bc02f28863f631001bf2922ebedd72dc999d5d63269e3abf27e3c310c85a | Rust | 5,102 | 145 | use std::path::PathBuf;
use super::*;
fn options() -> ExportOptions {
ExportOptions {
info_schema_dir: PathBuf::from("target/info_schema/v1"),
output_dir: PathBuf::from("target"),
duckdb_cdn_base: None,
analytics_enabled: true,
}
}
fn bootstrap(options: &ExportOptions) -> Site... |
81128c55609e797e8e3aa214fbd2a0b20a437ca21b31784321d6807231a53740 | Rust | 5,106 | 183 | use std::{cmp, ops};
use dbt_antlr4::token::Token;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize, Hash)]
pub struct CodeLocation {
/// 1-based line number
pub line: u32,
/// 1-based column number(unicode characters)
pub col: u32,
/// 0-ba... |
f15ef640c9ff0cd00627612a2a3ab4c38811d47e268463b599074439173f7972 | Rust | 5,108 | 135 | //! Bottom-up value-level posterior for volatile-node layers, mirroring
//! `pyhgf/updates/vectorised/volatile/posterior.py`.
use crate::math::{with_coupling, CouplingFn};
use crate::vectorised::layer::LayerState;
use crate::vectorised::mat::{Float, Matrix};
use ndarray::s;
/// Update the value-level posterior (preci... |
ce129665701a368be0d26b3098f12df5d6aba5548b2bf2c206642d1316d85360 | Rust | 5,141 | 152 | use super::common::{ConfigField, ConfigProcessor, FieldValue, InteractiveSetup};
use dbt_common::FsResult;
use dbt_schemas::schemas::profiles::BigqueryDbConfig;
use dbt_schemas::schemas::serde::StringOrInteger;
impl InteractiveSetup for BigqueryDbConfig {
fn get_fields() -> Vec<ConfigField> {
vec![
... |
e3ed22066e36606d0663868bfdd88f588a70107b2b30ce091e0ce2169f6db6f6 | Rust | 5,183 | 138 | //! Maximal exact match (MEM) anchors.
//!
//! # What an anchor is for
//!
//! A read that genuinely came from a transcript will match it exactly over long
//! stretches, broken only by sequencing errors and genetic variants. Those
//! stretches are the anchors, and they are the evidence chaining reasons about:
//! rat... |
19d29874c522aa37f79c5d24a9391f37333707f6ee761d9615ff37229123d22c | Rust | 5,188 | 179 | use arrow::array::ArrowNativeTypeOp as _;
use arrow::datatypes::DecimalType;
use minijinja::value::{Object, ObjectRepr};
use minijinja::{Error, Value};
use std::fmt;
use std::sync::Arc;
// The interface is supposed to be similar to Python's decimal module [1][2],
// and the implementation is based on the code from the... |
3ec3f1f6256bc9f441406c74990cc4b197ced6aa5f62f018918d4a1c04b95505 | Rust | 5,197 | 129 | use dbt_common::FsResult;
use dbt_schemas::schemas::packages::{DbtPackages, DbtPackagesLock};
use std::collections::HashSet;
use crate::notices::{PackageNotice, PackageNoticeKind};
use crate::package_listing::{PackageListing, UnpinnedPackage};
use crate::package_resolver::ResolvedPackage;
use crate::{package_checksum:... |
4af9845d4a84d7dab7f5a32b94849cdfe41e0577cba503e9c7f989ebe1cc9982 | Rust | 5,248 | 157 | use std::io;
use std::sync::Arc;
use std::time::Duration;
use axum::Router;
use tracing::info;
use crate::DocsServeArgs;
use crate::assets::serve_assets;
use crate::providers::Providers;
use crate::resolve_info_schema_dir;
use crate::state::AppState;
/// Run the docs server. Must be called from within a tokio runtim... |
f54638143a0d2b349afc548704109f18ff75c2991a8f8d33824c98fdb8b63938 | Rust | 5,263 | 146 | //! Tests covering `ResolveCore` end-to-end:
//!
//! 1. The typed ctx serializes to exactly the same key set today's hand-built
//! parse-env `BTreeMap` did in `phases/parse/init.rs` — 11 keys in a fixed
//! order.
//! 2. Object identity for `var` (a `JinjaObject<ConfiguredVar>`) survives the
//! serde round-t... |
fe7d9679c4b363750c58d0863545c2ce3d9fcdd4022926a19650c0682ed0869c | Rust | 5,271 | 148 | use super::common::*;
use dbt_common::{ErrorCode, FsResult, fs_err};
use dbt_schemas::schemas::profiles::PostgresDbConfig;
use dbt_schemas::schemas::serde::StringOrInteger;
impl InteractiveSetup for PostgresDbConfig {
fn get_fields() -> Vec<ConfigField> {
vec![
ConfigField {
nam... |
585f4e6325dcbe36a50df4166db3c9ca2f7b223d8f589806e7591a43fb5b6225 | Rust | 5,342 | 172 | //! https://github.com/databricks/dbt-databricks/blob/main/dbt/adapters/databricks/relation_configs/comment.py
use crate::errors::AdapterResult;
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, diff, impl_loader,
};
use crate::relation::databricks::config::{
... |
dca6b90fe0f67ffc6e61573a1f95a7c2149f6ca0c419ebd73182ea1aac9271fc | Rust | 5,370 | 166 | use std::collections::{BTreeMap, HashSet};
use std::fmt;
use std::rc::Rc;
use std::sync::Arc;
use dashmap::DashMap;
use serde::Serialize;
use crate::compiler::ast;
use crate::compiler::cfg::build_cfg;
use crate::compiler::instructions::Instructions;
use crate::compiler::meta::find_undeclared;
use crate::compiler::par... |
288587d7d7807b4bfed3cc8f4528720f9bc3699e72be62ebf8027a735556660f | Rust | 5,378 | 133 | //! Alignment mode supports posterior uncertainty (bootstrap / Gibbs) through the
//! same packed equivalence-class samplers as reads mode. This test confirms the
//! `aux_info/bootstrap/{names.tsv.gz, bootstraps.gz}` files are emitted, align
//! positionally and by name with `quant.sf`, and that each replicate conserv... |
94d1559684f5f84063418591006c4752018d29e7c78d687150894c250d8766e1 | Rust | 5,378 | 67 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
283b6bdc4849a50f7908a73f93336cdb1bdf140bb9b2bf4a29a7bdfe2e0501aa | Rust | 5,387 | 55 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
8a97a129420db9f5ee6ac779faa44ebc37759f4bba4b24015e914aea7ba751ae | Rust | 5,408 | 167 | #![allow(clippy::let_and_return)]
#![allow(clippy::collapsible_else_if)]
use std::io;
use dbt_adbc::{Backend, database};
mod config;
// Database-specific auth implementations
mod athena;
mod bigquery;
mod clickhouse;
mod databricks;
mod duckdb;
mod exasol;
#[cfg(test)]
mod flock;
mod lake_compute;
mod postgres;
mod... |
89b351cc8fb7624826b942770e24ddf17392d6e9fdb55ad920dffa44bc1e1183 | Rust | 5,409 | 164 | use crate::{ErrorCode, FsResult, fs_err};
use std::fs;
use std::path::Path;
/// Remove a top-level mapping entry from a YAML file by key while preserving formatting and comments.
///
/// This is a best-effort, indentation-aware text manipulation. It assumes the target key starts
/// at indentation level 0 as `<key>:` ... |
6be1d61bb0ef6189af9bd0d104c52381b4ab8b29717670185a3fc734b22d7995 | Rust | 5,430 | 164 | //! Dbt-specific convenience helpers built on top of the generic tracing emit API.
use dbt_error::{ErrorCode, FsError};
use dbt_telemetry::{LogMessage, ProgressMessage};
use super::fs_error_log::FsErrorLog;
use dbt_tracing::emit::{
emit_debug_event, emit_error_event, emit_info_event, emit_trace_event, emit_warn_... |
f3306789677b9f265ab2c6b946dcf7d4903e2d78fa3a0e0bd9585a9704c29f70 | Rust | 5,446 | 190 | use std::fmt;
use serde::Deserialize;
/// Represents a token in the stream.
#[derive(Debug)]
#[cfg_attr(
feature = "unstable_machinery_serde",
derive(serde::Serialize),
serde(tag = "name", content = "payload")
)]
pub enum Token<'a> {
/// Raw template data.
TemplateData(&'a str),
/// Variable b... |
9fb5c4e3391a406393441577dd9e81866b13466c75cfe946018ed9c4e50847cd | Rust | 5,458 | 166 | // Artifact freshness tracking — write side.
//
// After ingestion we store lightweight file fingerprints (mtime + size) so
// subsequent commands can detect when artifacts have changed on disk and
// automatically re-ingest before serving stale data.
use std::collections::HashMap;
use std::path::Path;
pub const META... |
cb7f132b59c577c78861fd04f3fb5694ee4344ca7d1a71b5a32ffe6c0add41a3 | Rust | 5,467 | 178 | //! Testing utilities for relation configs
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigChange, RelationComponentConfigChangeSet, RelationConfig,
RelationConfigLoader,
};
use dbt_schemas::schemas::nodes::DbtModel;
use minijinja_contrib::testing::jinja_diff;
const JINJA_INTROSPECT: &str = "... |
76b842967512c2a11a026e9acb4fc33f5d5d91b26fe7d5af361ca260dd752f0d | Rust | 5,474 | 64 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
1051d7b1c40db1ea6437a2b1d30fee4dd09de2e5650e032b11f5593eb93ef1a5 | Rust | 5,479 | 60 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
1020e03a63aa3627ea55b26257b6cc6528944ffa412d3acd6c73c678210ab349 | Rust | 5,483 | 184 | use std::sync::{Arc, OnceLock};
use dbt_error::FsError;
use dbt_telemetry::LogMessage;
use dbt_tracing::{
AnyTelemetryEvent, RecordCodeLocation, TelemetryAttributes, TelemetryContext,
TelemetryEventRecType, TelemetryOutputFlags, serialize::traits::ArrowAttributesSerialize,
};
/// A log event that retains its ... |
4c0d0a7c3da97105746d46b102c7a6d5bb311f6c3b9d852d5c5fa68f820621cc | Rust | 5,494 | 59 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
7a3d275cd2a575bca8b975a42ce4f5cee83f67c2fc51605d4c8389ee8e0529e8 | Rust | 5,525 | 151 | use super::common::*;
use dbt_common::{ErrorCode, FsResult, fs_err};
use dbt_schemas::schemas::profiles::ExasolDbConfig;
use dbt_schemas::schemas::serde::StringOrInteger;
impl InteractiveSetup for ExasolDbConfig {
fn get_fields() -> Vec<ConfigField> {
vec![
ConfigField {
name: "... |
8329ba3609ec38c9678989f21bd4190ba00550a0de12e575d8e1feb90b27ecea | Rust | 5,561 | 160 | use std::collections::HashMap;
use std::ops::Deref;
use std::str::FromStr;
use async_trait::async_trait;
use dbt_common::{ErrorCode, FsError, FsResult, err};
use dbt_schemas::schemas::ResolvedCloudConfig;
/// A private package definition, rendered and ready to hand to a
/// [`PrivatePackageResolver`].
#[derive(Debug,... |
7752df42e63565e270c79a646fb5d39865c3890fb95ca10eebc9f52f893b7e3d | Rust | 5,567 | 120 | use dbt_common::FsResult;
use dbt_common::cancellation::{CancellationReport, CancellationTokenSource, TIMEOUT_AFTER_CTRL_C};
use dbt_common::fail_fast::FailFast;
use dbt_tracked_stmt::{StmtCancellationReport, cancel_all_tracked_statements};
use std::pin::Pin;
use std::time::{Duration, Instant};
/// Runs the given fut... |
995c494c4ad1be1ad77acdbe669bf979187def93ae2305fb54694a9cb66d4851 | Rust | 5,579 | 192 | //! This crate adds utilities to embed MiniJinja templates
//! directly in the binary. It is a static version of the
//! `path_loader` function with some optional filtering.
//!
//! First you need to add this as regular and build dependency:
//!
//! ```text
//! cargo add minijinja-embed
//! cargo add minijinja-embed -... |
8188d0ff7762ccfb4d99e3ce0a9634ae1b23be2027a37c39ef9f3adc46e5fd7e | Rust | 5,583 | 169 | use std::str::FromStr;
use crate::errors::{AdapterError, AdapterErrorKind};
#[derive(Default, Clone, Copy, Debug, PartialEq, Eq)]
pub enum EngineVersion {
/// A NULL version
#[default]
Unset,
/// An upper bound version like `16.x`
Upper(i64),
/// A full `{major}.{minor}` version like `16.2`
... |
5596ff1cf8d804d380def9160434bb5385134aeea9f8592f16ed8e723f73192e | Rust | 5,587 | 152 | //! 2.6.0 flips the default quantification path to deterministic (#1140).
//!
//! These tests pin the flip's contract at the binary level: a bare run takes
//! the deterministic two-phase path (auditable via `meta_info.json`'s
//! `inference_path`), `--online` selects the deprecated one-pass path with a
//! deprecation... |
1270f2a0dfa2a6751a8dca00f258f168473039afa117502066b147f5037cb70d | Rust | 5,604 | 187 | use std::collections::BTreeMap;
use std::fmt;
use anyhow::{anyhow, Error};
use minijinja::{context, Environment, Value};
use rustyline::error::ReadlineError;
use rustyline::DefaultEditor;
use crate::cli::print_error;
pub fn run(mut env: Environment, ctx: Value) -> Result<(), Error> {
let mut editor = DefaultEdit... |
86237b4636a3379472ef1c2ecd23e3cf988241102d2eed6efa58942a4338fdd0 | Rust | 5,605 | 155 | use std::path::Path;
use std::time::SystemTime;
use tokio;
use crate::error::LiftableResult;
use crate::{FsResult, ectx};
/// Wrapper around [`tokio::fs::create_dir_all`] that returns a useful error in case of failure.
pub async fn create_dir_all(path: impl AsRef<Path>) -> FsResult<()> {
let path = path.as_ref();... |
321a7ef46d740e803fc0b99f6d077c3609480b2772eb2657310baa137f5b60ce | Rust | 5,656 | 185 | use crate::errors::{AdapterError, AdapterErrorKind, AdapterResult};
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, diff, impl_loader,
};
use crate::value::none_value;
use arrow_schema::Schema;
use dbt_schemas::schemas::{DbtModel, InternalDbtNodeAttributes};
use... |
7922c20bfcff6d78b8cea0ac80e18cce5b62d4005ce9b4481e3f7f502d4b35e6 | Rust | 5,686 | 63 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
d60a30f1145581d6aced0c141ddf9ffb8cf5634819969e1815f26358a452c929 | Rust | 5,686 | 187 | use serde::Serialize;
use serde::de::DeserializeOwned;
use crate::client::PlatformClient;
use crate::error::{PlatformError, Result};
/// Envelope returned by the Discovery GraphQL API.
#[derive(Debug, serde::Deserialize)]
struct GraphQlResponse<T> {
data: Option<T>,
#[serde(default)]
errors: Vec<GraphQlEr... |
8494621a38ef2d86b40b690e2227142873624c686f1e2a60d4558788a6f9ebc1 | Rust | 5,756 | 166 | //! End-to-end output-contract checks for the deterministic flow (#1140):
//! decoy exclusion survives the full index → RAD → requant round trip,
//! phase 2 preserves phase 1's invocation record, and single-end provenance
//! tells the truth about where the FLD came from.
use std::path::{Path, PathBuf};
use std::proc... |
120268b0a6c67085fd6e342415994e895a8edb3fbf00ab90678cc43fe1905335 | Rust | 5,772 | 202 | use std::collections::BTreeMap;
use insta::assert_snapshot;
use similar_asserts::assert_eq;
use minijinja::Environment;
use minijinja::Value;
#[test]
fn test_basic() {
let mut env = Environment::new();
env.add_template("test", "{% for x in seq %}[{{ x }}]{% endfor %}")
.unwrap();
let t = env.get_... |
394581e879bdaffbd16a4d43c5775ebf2433c7d31d191e0cca3c447e2a6feba4 | Rust | 5,772 | 151 | //! Log-space arithmetic helpers.
//!
//! # Why log space
//!
//! Salmon multiplies together many probabilities: the chance a fragment has this
//! length, times the chance of this sequence context, times the chance of this
//! position, and so on, over hundreds of millions of fragments. Multiplying a
//! few dozen num... |
578306f56f00bd628a37c6d0e6654a723ef0cc46b4a540716e8c6509ad4c7cec | Rust | 5,799 | 70 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
b4112753a2dc0c6e620a1ccee83fac2c268a201212c8f9c9a31487bfdbdc298c | Rust | 5,813 | 141 | //! Deterministic local repro for the "context deadline exceeded (Client.Timeout
//! exceeded while awaiting headers)"
//!
//! Strategy: stand up a slow TCP listener on 127.0.0.1 that accepts the
//! connection, optionally reads bytes, but never responds with HTTP headers
//! within the test's window. Point the Snowfla... |
85a09fc67f7ff294454c5ef13648600437133f153f1b6e2783f57d3937c42ad9 | Rust | 5,814 | 73 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
12c787dba5c623ee0be8df69607f1f22fd7cc49d3aadb77e70911f5d9edad7d7 | Rust | 5,854 | 134 | //! `window.__DBT_DOCS__` — the build-scoped scalars the SPA needs at t=0.
//!
//! These are facts about the *build*, not about the data: the dbt version that
//! produced the site, which distribution produced it, whether analytics is
//! consented, and where to fetch DuckDB-WASM. They are inlined into `index.html`
//!... |
2f9ae128061027b7f31de5c7431c79f02124beee5977f42c42206a9a8d9564f8 | Rust | 5,899 | 221 | #![cfg(feature = "builtins")]
use minijinja::value::Value;
use minijinja::{args, Environment};
use similar_asserts::assert_eq;
use minijinja::filters::{abs, indent};
#[test]
fn test_filter_with_non() {
fn filter(value: Option<String>) -> String {
format!("[{}]", value.unwrap_or_default())
}
let m... |
660991f2dc134415cf665391afdde90c872ff02268f7652109ff68e271bd685f | Rust | 5,943 | 146 | //! OS-appropriate resolution of a local, per-user cache directory.
//!
//! This is intentionally independent of the [`crate::lease`] module: it's a
//! general "where should dbt put a local cache file that isn't the flat
//! `~/.dbt` config directory" primitive, reused by anything that needs a
//! private per-user cac... |
0616945861d970088819d11e44efb26f135c4177265a5c296b129c0e4ea6f9ae | Rust | 5,946 | 199 | use std::{collections::BTreeMap, rc::Rc, sync::Arc};
use crate::{
types::{
function::{ArgSpec, FunctionType},
list::ListType,
tuple::TupleType,
DynObject, Object, Type,
},
TypecheckingEventListener,
};
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct... |
d6ab362d05e7367d4a26acfc4f28db34f8ffd2a77bae46649ffb6e950bcc1150 | Rust | 5,973 | 144 | //! DBR (Databricks Runtime) capability management system.
//!
//! Provides a centralized way to check for DBR version-gated features,
//! replacing scattered version comparisons with named capabilities.
//!
//! Reference: https://github.com/databricks/dbt-databricks/blob/25caa2a14ed0535f08f6fd92e29b39df1f453e4d/dbt/ad... |
9a5ba04f5502f832b004545b9a20e5454e478680d282fdae5d9656c0395b0c5e | Rust | 5,988 | 163 | /*
* dbt Cloud API v3
*
* The version of the OpenAPI document: 3.0.0
* Contact: support@getdbt.com
* Generated by: https://openapi-generator.tech
*/
use super::{ContentType, Error, configuration};
use crate::{apis::ResponseContent, models};
use reqwest;
use serde::{Deserialize, Serialize, de::Error as _};
/// s... |
5c24ba7518aaa155972c9626bddfb584d81821b76340554b974d834a443fcc30 | Rust | 6,005 | 207 | use dbt_common::{AdapterError, AdapterErrorKind, AdapterResult};
use minijinja::{State, Value};
const DEFAULT_SNOWFLAKE_PYTHON_PACKAGE: &str = "snowflake-snowpark-python";
pub fn finalize_python_code(
state: &State,
model: &Value,
compiled_code: &str,
) -> AdapterResult<String> {
// Extract config fro... |
39fefb4dd981ae3298e47596d4ab3cf9bf2ab6667514543090478f3a86579c0a | Rust | 6,017 | 152 | /// Utility macro that creates a type erased version of a trait.
///
/// This is used in the engine to create a `DynObject` for an `Object`.
/// For the exact use of this look at where the macro is invoked.
macro_rules! type_erase {
($v:vis trait $t_name:ident => $erased_t_name:ident {
$(fn $f:ident(&self $... |
bb213620ac1076967a2274e5ceef66bec049148e7b3bd6a1d266f51471311720 | Rust | 6,017 | 183 | use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use dbt_adapter::adapter::DefaultAdapterFactory;
use dbt_adapter::sql_types::DefaultTypeOpsFactory;
use dbt_common::FsError;
use dbt_common::collections::DashMap;
use dbt_dag::schedule::Schedule;
use dbt_frontend_common::sources_extractor::SourcesExtracto... |
3f5c87ecd72fd7901cd5e0bf602e739bff50d619722f03c62538ffb760ebc05f | Rust | 6,049 | 90 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
b785c8d16311c9fb820a117ebe49de864adfb446b46212883989fe643a7aa5bc | Rust | 6,049 | 234 | use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::borrow::Cow;
use std::path::Path;
use std::sync::Arc;
use ustr::Ustr;
/// Owned version of [Ident].
pub type Identifier = Ident<'static>;
/// A cheaply-clonable type that implements SQL identifier semantics.
///
/// An [Ident] is essentially a re... |
090da63c00a996ee48625722943167573b7d253e401204f5adc9af3599908f60 | Rust | 6,077 | 170 | use std::sync::Arc;
use crate::tracing::dbt_init::create_tracing_subcriber_with_layer;
use crate::tracing::tracing_feature_handles::FsTracingConfigProvider;
use crate::tracing::{
TracingConfigProvider,
dbt_emit::emit_warn_log_message,
dbt_metrics::{FusionMetricKey, InvocationMetricKey},
layer::{Consume... |
7c636f6d54914b629ed1429d3205f64addc786f30db0c3eb6f747fd52668bbcf | Rust | 6,091 | 165 | use super::common::*;
use dbt_common::{ErrorCode, FsResult, fs_err};
use dbt_schemas::schemas::profiles::ClickHouseDbConfig;
use dbt_schemas::schemas::serde::StringOrInteger;
impl InteractiveSetup for ClickHouseDbConfig {
fn get_fields() -> Vec<ConfigField> {
vec![
ConfigField {
... |
d8ab33ccc576417b2436077a39e35e5ef481656e7b50420e415c6c2132db56cf | Rust | 6,113 | 78 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
96c29261e8a76a2fcce0a8f485631cfd34cf24ddaf21efb95b8b22a19129f378 | Rust | 6,157 | 67 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
7b18fdb8877aa645a7bc9e58f48c0f1bc699217bd0499c2d4ca832a26e50f403 | Rust | 6,174 | 163 | //! The decoder decision is made **per input file**, not once for the run.
//!
//! This matters for correctness, not just performance. A run may mix a regular
//! gzip file with a plain FASTQ, a zstd file, or a FIFO / process substitution
//! (`-1 <(zcat ...)`). The parallel decoder needs to seek, so it can only be
//!... |
a258c959fe7768037cc1817f53c095cb46c39b0894e79562c9bc61edbd70cd2a | Rust | 6,182 | 181 | use std::fs;
use crate::{
AdapterConfig, Auth, AuthError, AuthWarningPrinter, PrivateKeySource, auth_configure_pipeline,
};
use database::Builder as DatabaseBuilder;
use dbt_adbc::salesforce::auth_type;
use dbt_adbc::{Backend, database, salesforce};
pub struct SalesforceAuth {
pub warning_printer: Box<dyn Au... |
f486ee4eda880202c6dc74be693237f0b9c17e1a8626b4e886b1ca5d9caf51d4 | Rust | 6,185 | 188 | //! Helpers for inserting a gateway/service subdomain label into a dbt Cloud
//! account host across the various host shapes dbt Cloud uses (Multi-Cell,
//! Multi-Cell staging, Multi-Tenant US/EMEA/AU, Single-Tenant, devspace,
//! vanity).
use crate::{ErrorCode, FsResult, fs_err};
/// Insert `label` as a new subdomai... |
835f4be58a6eaf968ff84f32c1d5d1e362f2d6b9a1d752d9f0c3e7ebf4f8cbc2 | Rust | 6,205 | 75 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
faf19078f3dadef4715e3adbaae574c4b0937f29f9cc7855085994e2b325b14c | Rust | 6,216 | 81 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
4fba9f7fa3ab2aa5ff2a2a44e0dd95bcee4e5da2ff6d084177713a09357cb6a6 | Rust | 6,217 | 81 | /*
* dbt Cloud API v3
*
* # How to use this API The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account. With it, you can replicate resources across projects, accounts, and environments, or standardize project creation for business teams. For endpoints related to jobs and r... |
35745e62f2abce6fb74abac99bcee88ce1283141bbc1089a7ad84ced10d19298 | Rust | 6,254 | 163 | use chrono::{DateTime, Utc};
use dbt_telemetry::{QueryExecuted, QueryOutcome};
use std::fmt::Write as _;
use std::time::SystemTime;
use super::duration::format_duration_for_summary;
/// Format a query log event from QueryExecuted attributes and timing information
pub fn format_query_log(
query_data: &QueryExecute... |
39efd9f79c5d85ad089182642ae4c759d5f59e56384f76108701d1b5c9fbb2e1 | Rust | 6,254 | 185 | // https://github.com/databricks/dbt-databricks/blob/main/dbt/adapters/databricks/relation_configs/partitioning.py
use crate::errors::AdapterResult;
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, diff, impl_loader,
};
use crate::relation::databricks::config::{
... |
5e013a8e46049d2d8bb85ba2f14e3c3aacf1481639eacaf39c06b0e27f770192 | Rust | 6,357 | 195 | use crate::{
Dialect, Qualified, QualifiedName,
ident::{Ident, Identifier},
};
use counter::Counter;
use itertools::Itertools;
use regex::Regex;
use std::sync::{Arc, LazyLock};
/// Represents a candidate name in a reference context. Used to format error
/// messages.
#[derive(PartialEq, Eq, PartialOrd, Ord, Ha... |
df17b2b10df01b621a78e5ff55e115d7c493b8ec3fe3e8b4d801f05dc7da2b2b | Rust | 6,400 | 158 | //! Shared helpers for `MetadataAdapter::freshness_with_overrides` impls.
//!
//! The override path (`loaded_at_field` / `loaded_at_query`) is fundamentally
//! standard SQL plus timestamp parsing — only the bulk INFORMATION_SCHEMA-style
//! query differs across adapters. This module owns the parts that don't.
use std... |
a94cff6cf63b63097cd36bacf1c225c78ba640114a37ef8dc1d669cd1d665e36 | Rust | 6,402 | 202 | //! CatalogProvider implementations backed by the schema store.
//!
//! Unlike the default DataFusion catalog list, these providers guarantee that a
//! catalog/schema lookup always succeeds by delegating table discovery to the
//! schema store at the moment DataFusion asks for it.
use datafusion_catalog::{CatalogProv... |
7aff12681eb8850a9ba86599ab1d33534f428752ab38780724c46e92f418edd3 | Rust | 6,403 | 182 | use crate::error::InternalResult;
use crate::expr::{Evaluator, Value, try_parse};
use crate::internal_err;
use arrow::datatypes::DataType;
use linked_hash_map::LinkedHashMap;
use std::rc::Rc;
#[derive(Debug, Clone)]
pub struct ConstraintMap {
pub types: LinkedHashMap<String, DataType>,
pub integers: LinkedHash... |
d4118ab3a1903645a66e60c177b2b86e74f3190559b3f15282abf51beb3f775d | Rust | 6,414 | 143 | use std::fmt;
use std::rc::Rc;
use std::sync::Arc;
use dbt_adapter::Adapter;
use dbt_adapter::cast_util::downcast_value_to_dyn_base_relation;
use minijinja::arg_utils::ArgsIter;
use minijinja::listener::RenderingEventListener;
use minijinja::value::Object;
use minijinja::{
Error as MinijinjaError, ErrorKind as Min... |
d8a732728ab6fabced5559b7e04bb629b06bf084f2377045b3fdd1fb71027454 | Rust | 6,429 | 185 | use std::collections::{BTreeMap, HashSet};
use std::path::PathBuf;
use std::sync::Arc;
use dbt_adapter::relation::RelationObject;
use dbt_adapter_core::AdapterType;
use dbt_common::io_args::StaticAnalysisKind;
use dbt_common::serde_utils::convert_yml_to_value_map;
use dbt_jinja_utils::{mock_object::MockJinjaObject, ph... |
0bb85414b8d95bf77b6e3ebbe2fbea1f6f02107fbd2aac2cc3dc2085e266ea87 | Rust | 6,436 | 163 | pub(crate) mod components;
pub(crate) mod relation_types;
pub(crate) mod test_helpers;
use arrow::record_batch::RecordBatch;
use arrow_array::{Array, BooleanArray, StringArray};
use std::convert::TryFrom;
use std::sync::Arc;
use dbt_agate::AgateTable;
use minijinja::Value;
use crate::record_batch::RecordBatchExt;
/... |
53a4f57adc9225858d49edfa8cf908635b511df39d0ca75789e480ea2f761442 | Rust | 6,471 | 204 | use crate::Tuple;
use crate::table::TableRepr;
use crate::{MappedSequence, TupleRepr};
use core::fmt;
use minijinja::arg_utils::ArgsIter;
use minijinja::listener::RenderingEventListener;
use minijinja::value::{Enumerator, Object, ObjectRepr};
use minijinja::{State, Value, assert_nullary_args};
use std::rc::Rc;
use std:... |
56e069bfc30df4193b744b3a5b88bfaaae9556992d1c1b67693a7c2dfbd2ca3c | Rust | 6,590 | 162 | /// Utility macro that creates a type erased version of a trait.
///
/// This is used in the engine to create a `DynObject` for an `Object`.
/// For the exact use of this look at where the macro is invoked.
macro_rules! type_erase {
($v:vis trait $t_name:ident => $erased_t_name:ident {
$(fn $f:ident(&self $... |
4d361efe58446250c51c62a4d977a5b3d121178c7d1f5b9a368c67e06e18cfa7 | Rust | 6,602 | 196 | use crate::io_args::{EvalArgs, Phases, StaticAnalysisKind, StaticAnalysisOffReason};
use crate::path::DbtPath;
use crate::stdfs::File;
use crate::tracing::dbt_metrics::{error_count_checkpoint, return_exit_code_from_error_counter};
use crate::{ErrorCode, FsResult, err, fs_err, stdfs::canonicalize};
use dbt_telemetry::{E... |
bb156d38c10ace6b26b1048f28d596da614c29d4b129dcb65081418e0142b0b4 | Rust | 6,603 | 168 | //! `views.sql` generation.
//!
//! Driven off `INFO_SCHEMA`, so a table cannot be added without its view.
//!
//! Statement generation is pure and lives here; `views.sql` and a live
//! connection are two renderings of it. That is the same split
//! [`crate::view_defs`] makes for the index, and for the same reason: th... |
6d01d4a3993326281ca40395d3778b4915b6701245da3b8362cce741868884ff | Rust | 6,624 | 168 | use dbt_adapter_core::AdapterType;
use dbt_adapter_sql::types::SqlType;
/// Generates a safe SQL projection expression for BigQuery struct columns.
///
/// This recursively builds an explicitly aliased projection for nested structures
/// so that BigQuery aligns the data by name rather than position. If no structural
... |
1e279783a2763b39d30780e4e74d066c74ded66f3cbdbe7132528563e5ab0ad4 | Rust | 6,719 | 196 | //! `--skipQuant --deterministic` maps and stops.
//!
//! It used to quantify anyway: phase 1 sets `skip_quant` for its own purposes
//! (map, write the RAD, do not run the online EM), so the user's request was
//! overwritten there and never reached phase 2. The run produced a full
//! `quant.sf` from a flag asking fo... |
2c6498ab2427b00fe4771be0cf51f148fc3d4a4ec92574aa30680920fdab73f3 | Rust | 6,725 | 191 | //! Formatting helpers for generated Jinja macro arguments.
use std::{collections::BTreeMap, sync::LazyLock};
use regex::Regex;
use serde_json::Value as JsonValue;
/// Formats a JSON value as a Jinja macro argument literal.
pub fn format_value_for_jinja(
value: &JsonValue,
jinja_set_vars: &BTreeMap<String, S... |
49a91f980e441af7d0efbac933c4d65b003579ced6b1199e2f2dd5c549bc28e7 | Rust | 6,730 | 159 | use crate::collections::{HashMap, HashSet};
use dbt_error::ErrorCode;
use dbt_tracing::{LogRecordInfo, SeverityNumber, SpanStartInfo};
use super::super::{
data_provider::DataProvider,
dbt_metrics::{FusionMetricKey, InvocationMetricKey},
fs_error_log::{FsErrorLog, get_log_message_mut},
layer::TelemetryM... |
cd3c91ccd3714766cbc34a6acc8a26b1ec2fb70ae290d6383c4076231a9c10ca | Rust | 6,778 | 196 | //! https://github.com/databricks/dbt-databricks/blob/main/dbt/adapters/databricks/relation_configs/tags.py
use crate::errors::AdapterResult;
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, RelationConfig, SimpleComponentConfigImpl, impl_loader,
};
use crate::relation::databricks::config:... |
bc4e7c7cec806866ebfa6a04b2c24610ac42b49b59a66b8e5fa933d531b4cd16 | Rust | 6,779 | 198 | use std::collections::BTreeMap;
use std::sync::Arc;
use dbt_adapter_core::AdapterType;
use dbt_adbc::Backend;
use dbt_auth::AdapterConfig;
use dbt_auth::Auth;
use dbt_auth::auth_for_backend;
use dbt_common::FsResult;
use dbt_common::cancellation::CancellationToken;
use dbt_common::io_args::ReplayMode;
use dbt_schema_s... |
5d0bd24d0db525aec9ebf0f18881ad3d94d0d297b95e1e89e14acbdc7f757013 | Rust | 6,784 | 197 | //! https://github.com/databricks/dbt-databricks/blob/main/dbt/adapters/databricks/relation_configs/query.py
use crate::AdapterType;
use crate::errors::{AdapterError, AdapterErrorKind, AdapterResult};
use crate::relation::config_v2::{
ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, diff, impl_lo... |
5a4df6f228c642c7451d44d386d9fe76ba0cdc01581b7c90a71a0bb4ef696ae0 | Rust | 6,808 | 189 | use std::collections::BTreeMap;
use std::sync::Arc;
use dbt_cloud_config::resolve_cloud_config;
use dbt_common::cancellation::CancellationToken;
use dbt_common::constants::DBT_PROJECT_YML;
use dbt_common::io_args::EvalArgs;
use dbt_common::tracing::TracingConfigProvider;
use dbt_common::tracing::dbt_emit::emit_warn_lo... |
7c3076256d1e2fdf62b156aee3db927819a43a7191af7853b5ae623ea2185d44 | Rust | 6,902 | 185 | //! Tests covering `CompileBaseCtx` end-to-end:
//!
//! 1. The typed ctx serializes to the same key set today's hand-built
//! `build_operation_context_btreemap` BTreeMap produces — 14 fixed keys
//! plus one top-level entry per `dbt_namespace` (via `#[serde(flatten)]`).
//! 2. `MACRO_DISPATCH_ORDER` per-namespac... |
87131b8b0b983105182f91ee110b3cb67d09895e296f3676aaee2fc049ddb3e1 | Rust | 6,918 | 201 | use chrono::FixedOffset;
use minijinja::arg_utils::ArgParser;
use minijinja::{value::Object, Error, ErrorKind, Value};
use std::fmt;
use std::rc::Rc;
use std::sync::Arc;
use super::timedelta::PyTimeDelta;
// ── PyTzInfoClass (modules.datetime.tzinfo) ─────────────────────────
#[derive(Clone, Debug)]
pub struct PyTzI... |
42952190ebc01f4291a66f848a964ddc561bf68486df4671369e13fdb6ed7606 | Rust | 6,976 | 187 | use minijinja::arg_utils::ArgsIter;
use minijinja::{Error, ErrorKind, State, Value};
/// The prefix for environment variables that contain secrets
pub const SECRET_ENV_VAR_PREFIX: &str = "DBT_ENV_SECRET";
/// The prefix for environment variables that are reserved for dbt
pub const DBT_INTERNAL_ENV_VAR_PREFIX: &str = ... |
12c217d3245532618d835791406ce7a7ca68d284000aa6f64ee6f5a1a0fdcf83 | Rust | 7,029 | 203 | use std::fmt::Write as _;
use std::io::Read as _;
use std::path::PathBuf;
use dbt_adbc::install::{self, DriverTriplet, find_expected_checksum, format_driver_url};
use sha2::{Digest, Sha256};
const OS_ARCH: &[(&str, &str)] = &[
("apple-darwin", "aarch64"),
("apple-darwin", "x86_64"),
("manylinux_2_17-linux... |
0c3be7784e0d8538156834f4c1b510c94860a9f64db011ee337d6b10bda54472 | Rust | 7,058 | 153 | //! Per-render context structs for the run (materialize) phase.
//!
//! Run shares the parse `JinjaEnv` (mutated in place by
//! `configure_compile_and_run_jinja_environment`) so the structs in this
//! module describe *per-render* contexts only.
//!
//! The single struct here, [`RunNodeCtx`], is the per-node overlay l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.