sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
094c765c66dfd093250f18d8d98bbc255c2e04671583a10589be1d95cf5824cf
Rust
19,940
525
//! Read-only abstraction over the parquet artifact set. //! //! `Backend` is the gated "untyped SQL access" capability the docs server //! uses to power its non-feature endpoints (node listing, project info, //! catalog stats, etc.). The trait surface lives in this OSS crate; the //! real DuckDB-backed implementation ...
689c7f349afaec0b6930f28845be09a8f30514fdf276f6c577a21e3583950460
Rust
20,034
548
//! Event schemas for the time-machine recording system. //! //! This module defines the events captured during adapter execution, //! enabling cross-version artifact compatibility testing. use serde::{Deserialize, Serialize}; use super::semantic::SemanticCategory; /// Union of all recorded events from different ada...
f7d58cbaf91839973999d1ffd38921a746188e8c458c729d98fce52f45615e26
Rust
20,076
646
use std::collections::BTreeMap; use std::ops::Deref; #[cfg(feature = "internal_debug")] use std::fmt; use crate::compiler::tokens::Span; use crate::layout::JinjaLayoutEventKind; use crate::value::{value_map_with_capacity, Value}; /// Container for nodes with location info. /// /// This container fulfills two purpose...
f7ab6e7c9e9e31f62df03f3bbf572f2351eaaa5032047f23bf803dca747393c0
Rust
20,266
589
use std::{ collections::{BTreeMap, BTreeSet, HashMap}, fmt, sync::Arc, }; use crate::{ AdapterResult, AdapterType, errors::{AdapterError, AdapterErrorKind}, sql_types::TypeOps, }; use arrow::array::RecordBatch; use arrow_schema::{DataType, Field, Schema}; use chrono::{DateTime, Utc}; use dbt_ad...
7b37837ef0c28a5f3889a9c5eff88c94c2308a59b13c14a832c0cc05fd2c2288
Rust
20,430
609
use adbc_core::error::{Error as AdbcError, Result as AdbcResult, Status as AdbcStatus}; use adbc_core::options::{OptionStatement, OptionValue}; use arrow::array::{RecordBatch, RecordBatchIterator, RecordBatchReader}; use arrow_schema::{ArrowError, Schema}; use dbt_adbc::{Connection, Statement}; use std::collections::BT...
98bc37817f3013baa238ed48cc24884a59e9b296600dd9912b6fd3c84295448a
Rust
20,443
521
//! ADBC Connection //! //! use core::fmt; use std::collections::HashSet; use crate::driver_manager::ManagedConnection as ManagedAdbcConnection; use adbc_core::options; use adbc_core::{ Connection as _, Optionable, error::Result, options::{OptionConnection, OptionValue}, }; use arrow_array::RecordBatchRea...
e8d64281d9eb4f2c43260ec44b01c7058ac1eb87dec6734ae12c4acbdfd205e8
Rust
20,451
663
//! Test functions and abstractions. //! //! Test functions in MiniJinja are like [`filters`](crate::filters) but a //! different syntax is used to invoke them and they have to return boolean //! values. For instance the expression `{% if foo is defined %}` invokes the //! [`is_defined`] test to check if the value is ...
00764554ec1628612b8b2680f4cbf7e9d393b9124449873a2979b66fefa9fd4d
Rust
20,610
591
//! ADBC Database //! //! use crate::driver_manager::ManagedDatabase as ManagedAdbcDatabase; use adbc_core::{ Database as _, Optionable, error::{Error, Result, Status}, options::{AdbcVersion, InfoCode, OptionConnection, OptionDatabase, OptionValue}, }; use arrow_array::{ Array, cast::AsArray, t...
81e90436bef6a84aa8d558d266ade475da7dd1d85bb8b5c2a7c2fdb95589d2f6
Rust
20,611
520
//! Epoch-append parquet for column-level lineage (CLL). //! //! Files land at: //! ```text //! target/ //! metadata/compile/column_lineage/v1_{N}.parquet ← epoch-append, latest-wins by node //! ``` //! //! ## Invariant //! All edges for a given `to_node_unique_id` are written together in a single //! `write_cll_ep...
9341c035a42ede19db6d5349b06d98c89f892f86443673f692e6349442d66ad4
Rust
20,681
617
#![cfg(feature = "macros")] use std::collections::BTreeMap; use std::sync::atomic::AtomicBool; use std::sync::Arc; use insta::assert_snapshot; use similar_asserts::assert_eq; use minijinja::arg_utils::ArgParser; use minijinja::value::{Kwargs, Object, Value}; use minijinja::{args, context, render, Environment, ErrorKi...
8427fe7a05bbb5344b5d264c6ab9eb31840ca72d434db412b7b81566759eb1f8
Rust
20,913
502
//! Reduced config-component loader for Snowflake interactive tables. //! //! `SHOW INTERACTIVE TABLES` only exposes `cluster_by`, `target_lag`, `refresh_warehouse`, //! and `initialization_warehouse` — unlike dynamic tables, there is no corresponding column //! for `scheduler`, `refresh_mode`, `initialize`, `transient...
935a32aa45a300ed9d5111f831de27e9185165b075d028dbadc17d23084097ed
Rust
20,959
543
use crate::DbtCloudConfig; use dbt_schemas::schemas::project::ProjectDbtCloudConfig; pub use dbt_schemas::schemas::{CloudCredentials, ResolvedCloudConfig}; /// Returns the value of the environment variable `name`, or `None` if it is /// unset or empty. This prevents empty env vars from overriding valid config /// fil...
48fd76c9077de3a71da4a83426ea0c1b3f109d18edf3630f6e9caab58b8e7a15
Rust
21,297
543
// use serde_repr::{Deserialize_repr, Serialize_repr}; use std::{collections::HashMap, fmt::Display}; use dbt_proc_macros::include_frontend_error_codes; use int_enum::IntEnum; use strum_macros::{EnumString, IntoStaticStr}; /// Error codes for the SDF CLI. /// /// Error codes define the general "semantic type" of a [F...
ad1cc6d27719b5d3f4df07bc10b27681f0b8bfd51eb4413ab5304378bdb095a9
Rust
21,376
580
use std::cmp::Ordering; use std::fmt; use std::sync::Arc; use chrono::{Local, NaiveDate, NaiveTime, Timelike}; use minijinja::arg_utils::{ArgParser, ArgsIter}; use minijinja::{value::Object, Error, ErrorKind, Value}; use crate::modules::py_datetime::find_microsecond_directive; use crate::modules::py_datetime::timedel...
3589de0cde5c855a00587990199716af022b2b31142760c786a8b4a449d62816
Rust
21,756
566
use chrono::Duration; use minijinja::{arg_utils::ArgParser, value::Object, Error, ErrorKind, Value}; use std::fmt; use std::sync::Arc; use super::{ date::PyDate, datetime::{DateTimeState, PyDateTime}, time::PyTime, }; #[derive(Clone, Debug)] pub(crate) struct PyTimeDeltaClass; impl PyTimeDeltaClass { ...
ed8685cddac905fc46e5e2f2ee9c0b0242c2b8c158296fdbbe2b2557c468a8e3
Rust
21,759
683
//! Group 1 of the pre-2.6.0 readiness sweep: inputs and flag combinations that //! produced a *wrong answer presented as a right one* — a clean `quant.sf` and //! exit 0 over data salmon had silently discarded or a request it had silently //! dropped. Each is now refused at invocation. use std::path::{Path, PathBuf};...
dde5c160fc0946ca1671ea67b610d030b98fb885ea5356f6f07594715d916d85
Rust
21,873
722
#![cfg(all( feature = "multi_template", feature = "macros", feature = "builtins", feature = "adjacent_loop_items", feature = "deserialization" ))] use std::collections::BTreeMap; use std::fmt::Write; use std::fs; use std::sync::Arc; use insta::assert_snapshot; use minijinja::constants::{CURRENT_PAT...
b82fedf0422910222d85939552ca4c77a71941fed1275f657eff27d9ee822021
Rust
21,997
624
use std::path::{Path, PathBuf}; use std::sync::Arc; use std::{fs, slice}; use adbc_core::{ error::{Error, Result, Status}, options::{AdbcVersion, ObjectDepth, OptionStatement, OptionValue}, }; use arrow_array::RecordBatch; use arrow_schema::{Schema, SchemaRef}; use dbt_pretty_table::pretty_data_table; use dial...
63d5caca57d6d8fb5efe8159a8c40e173d817e2e4b50d0e9d4282ca984a5a353
Rust
22,128
519
use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, }; use crate::renderer::strip_warehouse_keys_in_config_block; use crate::resolve::resolve_utils::{ build_unrendered_config, err_resource_name_has_spaces...
df1bdd5d9ffff19b3398965643b907d0270b4006d12687887d758552705df53f
Rust
22,241
567
//! Colinear MEM chaining. //! //! # The problem //! //! A read's k-mers hit a transcript in several places. Some of those hits belong //! to one true alignment; others are coincidence — a repeat elsewhere in the //! transcript, a shared domain, a low-complexity stretch. Chaining separates the //! two by looking for an...
5a0ad04c987c61322c308f47bd27db29fd81d1f20636b9b3d042e30410f77c75
Rust
22,384
658
//! Tests for `dbt-snowflake/macros/materializations/interactive_table.sql`. //! //! The materialization is driven end to end: `relation.from_config(config.model)` and //! `relation.interactive_table_config_changeset(...)` are the real implementations, so `config.model` //! here is a `DbtModel` serialized exactly the w...
56496d6e9e741f402ec443f43c69f34c813d70fe82f9c2a8e97a7c0e3ef1367b
Rust
22,568
509
//! Unified bias-corrected effective length: composes sequence-specific, GC, and //! positional bias exactly as salmon's `updateEffectiveLengths` does — a single //! conditional-FLD convolution whose per-fragment factor is the product of the //! enabled bias terms. //! //! # What this computes, in words //! //! An unco...
6601ef861cddd9075deeb44a5f27ef706158950b31272172eb3dcaf5a19cfb33
Rust
22,591
523
use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, }; use crate::resolve::resolve_utils::build_unrendered_config; use crate::utils::{ extract_resource_config_from_raw_project, get_node_fqn, get_original_...
b5b728c2375192b94b0cdd87b24ae2ae3e31aa6d8524b261de9e32d08da272c3
Rust
22,648
601
use std::sync::Arc; use arrow::array::Array; use arrow::datatypes::DataType; use arrow::{ array::{ArrayRef, StringArray}, record_batch::RecordBatch, util::display::array_value_to_string, }; use arrow_schema::{Field, Schema}; use comfy_table::*; use comfy_table::{Table, presets::UTF8_FULL_CONDENSED}; pub f...
a40e7630e16d92a0e22e08c044aebb62b55f2dc4c9444167dcdfb35ebd1b7d2c
Rust
22,665
726
use dbt_common::{ErrorCode, FsError, FsResult, err, fs_err}; use std::sync::LazyLock; use std::{collections::HashMap, fmt::Display, str::FromStr}; const _MATCHERS: &str = r"(?P<matcher>\>=|\>|\<|\<=|=)?"; const _NUM_NO_LEADING_ZEROS: &str = r"(0|[1-9]\d*)"; const _ALPHA: &str = r"(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]...
d55daa388c11cda383724f1e3a9adc608dd4a0c146e5af17a0b1524ebbba35fc
Rust
22,832
546
use std::collections::{HashMap, HashSet}; use std::sync::Arc; use async_trait::async_trait; use chrono::Utc; use dbt_common::io_args::EvalArgs; use dbt_common::tracing::dbt_emit::emit_warn_log_message; use dbt_common::{ErrorCode, FsResult}; use dbt_docs_server::Providers; use dbt_docs_server::providers::{ Backend,...
0dbbcb8e2526e5ef472a2bbd4d15e1d185fe41c767fd463ead933674ddafd39a
Rust
22,964
577
//! Deterministic alignment mode: a transcriptome BAM/SAM projected to a salmon //! RAD via `write_alignment_rad`, then quantified with `quantify_rad`. Verifies //! the RAD is produced + fully baked (so requant is single-pass), mass is //! conserved, and the whole pipeline is reproducible run-to-run. use salmon_align:...
ad2c7d0f84ad03017ef6ca9a0e920b9eefcaf8dc4271e3826942a66342b1631c
Rust
23,081
645
//! Index-based selector resolution for parse cache. //! //! Evaluates selector expressions (FQN, tag, package, resource type) and //! `state:dirty` against the parquet parse cache **without** loading node //! payloads. Uses column projection to read only index columns from disk. //! //! ## Key invariants //! * Always ...
950cb57504cc306d38ad50a48e059f005f86b39ff54fe6339cfcd32471c1baa1
Rust
23,107
651
use std::collections::BTreeMap; use std::path::{Path, PathBuf}; use std::rc::Rc; use std::sync::{Arc, OnceLock}; use minijinja::Environment; use minijinja::listener::RenderingEventListener; use regex::Regex; use serde::Serialize; use crate::adapters::{AdapterConnections, ResolutionMode, parse_connections}; use crate:...
d661a91d6fe2056ac084bd2910d64c842a85623acf06c8e6b953067cd6d194bb
Rust
23,330
716
use crate::adapter::adapter_impl::AdapterImpl; use base64::Engine; use base64::engine::general_purpose::STANDARD as BASE64_STANDARD; use dbt_common::tracing::dbt_emit::{emit_warn_log_message, print_err}; use dbt_common::{AdapterError, AdapterErrorKind, AdapterResult, ErrorCode}; use serde::Deserialize; use serde::de::...
325e89c8dc84d34cdcd00c35cc7679dff4db79f52dc190348d0144779f14c4a4
Rust
23,387
623
//! Unified time machine engine for recording and replay. //! //! The `TimeMachine` enum provides a single abstraction for both: //! - Recording adapter calls during execution //! - Replaying recorded calls for compatibility testing use std::sync::Arc; use minijinja::Value; use dbt_adapter_core::AdapterType; use dbt...
4dfb150394cb37824ab75003c1c6af488ace204c7daec874ab625328012e51b4
Rust
23,589
558
//! Chunked `--writeBam` output. //! //! # What BAM is //! //! BAM is the binary form of SAM: the same records, encoded as fixed-layout //! little-endian structures and then compressed with BGZF — gzip applied to //! independent ~64 KiB blocks, so a reader can jump into the middle of a large //! file instead of decompr...
ac2948539be76f5176286ab6d08c14f75b808507887e415be8d913e2f842df4d
Rust
23,644
634
use crate::relation::{ComponentConfig, RelationChangeSet}; use dbt_agate::AgateTable; use dbt_schemas::schemas::DbtModel; use minijinja::Value; use minijinja::value::Object; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::convert::TryFrom; use std::fmt::{Display, Formatter}; use std::resu...
b5a1ab43db2dec5fd3e6b84772e5871924827f7ec5b416614f4446d0c0931f05
Rust
23,684
653
//! Retry command implementation for re-running failed nodes from previous executions. use dbt_clap_core::*; use dbt_common::io_args::StaticAnalysisKind; use dbt_common::{ErrorCode, FsResult, err}; use dbt_schemas::schemas::{BatchResults, RunResultsArtifact}; use std::collections::HashMap; use std::path::Path; use std...
4b2286b3c25f16810c14ac8ec2f81bbe183fef6fc97b2c7bea9a793045ac691d
Rust
23,720
668
use dbt_common::FsResult; use dbt_common::constants::DBT_PROJECT_YML; use dbt_common::tracing::dbt_emit::emit_warn_log_from_fs_error; use dbt_common::{ErrorCode, fs_err}; use dbt_jinja_utils::serde::{into_typed_with_jinja, value_from_file}; use dbt_jinja_utils::{Var, jinja_environment::JinjaEnv, phases::parse::build_re...
7dbc363aad7adcdca0dff75aca287175a6325f5271dcd43a8bd8adb0882edd3a
Rust
23,816
652
//! Test harness for dbt macro unit tests. //! //! Provides scaffolding to declare macro tests with minimal boilerplate. //! Every harness has a [`MockJinjaObject`] injected as the `adapter` global, //! pre-configured with `dispatch` and `execute` handlers. This is done as //! a utility as macros tend to very frequentl...
d559d16a50d6c8f3bf3c92e9b4f51f945d0041cedd24a14524eeac8f50b5cc1c
Rust
23,877
711
use std::collections::BTreeMap; use std::path::Path; use super::*; use crate::adapter::Adapter; use crate::adapter::adapter_impl::AdapterImpl; use crate::sql_types::DefaultTypeOps; use crate::stmt_splitter::DefaultStmtSplitter; use dbt_adapter_core::AdapterType; use dbt_common::cancellation::never_cancels; use dbt_sc...
7efbb64fd8480cf0856a36b8dddcca62e3038d780d7ac815c2d407cce9941198
Rust
23,989
699
use std::fmt::Debug; use dbt_adapter_core::AdapterType; use dbt_schemas::schemas::ResolvedCloudConfig; use dbt_schemas::schemas::project::QueryComment; use indexmap::IndexMap; use minijinja::{Error, State}; use regex::Regex; use serde::Deserialize; use serde_json::Map as JsonMap; use serde_json::Value as JsonValue; ...
5363af65e1425affae56e6fb09c207c3f9c4fb1c7f154ca3fb87d34d3ee1c389
Rust
24,176
610
//! The dbt information schema: a queryable parquet layer over dbt metadata. //! //! # Shape //! //! One flat, schema-prefixed parquet file per table (`dbt.models.parquet`, //! `dbt_rt.run_results.parquet`, ...) plus a generated `views.sql`. Three //! namespaces: `dbt` for project metadata, `dbt_rt` for runtime results...
626cf6c9f6cecc7959e313cd7c99c6cc3743fd1e65c88cda52a6a729c53e103f
Rust
24,387
649
//! Tarball download and extraction client. //! //! Downloads tarballs (`.tar.gz`) from URLs and extracts them directly to disk. //! Uses async streaming extraction (no intermediate files or memory buffering) //! and automatic retry logic for transient failures. //! Supports selective extraction with root directory str...
9f2a61ab099cf76921da071fa3824712e7cadea4b6c3aa2a899e63b584278c4c
Rust
24,424
662
use dbt_adapter_core::AdapterType; use dbt_common::cancellation::CancellationToken; use dbt_common::path::DbtPath; use dbt_common::tracing::dbt_emit::emit_warn_log_message; use dbt_jinja_utils::jinja_environment::JinjaEnv; use indexmap::IndexMap; use sha2::{Digest, Sha256}; use walkdir::WalkDir; use std::collections::...
352ef3357089fa1bc75075f9dc38c51d6a79b147f42932ad9a3d35c5e7b68abb
Rust
24,437
732
use std::any::Any; use std::borrow::Cow; use std::collections::{BTreeMap, HashMap}; use std::fmt; use std::path::{Path, PathBuf}; use std::sync::Arc; use async_trait::async_trait; use clap::{Parser, Subcommand}; use minijinja::Value as MinijinjaValue; use serde::{Deserialize, Serialize}; use uuid::Uuid; use dbt_adapt...
ba6ce36c2f935ea1048f4822876a9af5d11b5a63f97ae7cfe88f59c84e36001a
Rust
24,443
958
#![allow(clippy::disallowed_methods)] use std::collections::BTreeMap; use dbt_profile::{ResolveArgs, resolve}; // ── Dependency guardrails ──────────────────────────────────────────── // dbt-profile must stay lightweight — no dbt-common or dbt-jinja-utils. // These tests parse Cargo.toml and fail if a banned depende...
d180e2642be98d692d2032c7d2b1a74436324e9ab6da1f8c18fa9e32d2c396d2
Rust
24,490
654
//! Alignment error model — a port of salmon's `AlignmentModel` //! (`src/alignment/AlignmentModel.cpp`). //! //! # What it is for //! //! In alignment mode the aligner's own score (`AS`) is the only quality signal, //! and different aligners compute it differently — so weighting placements by it //! makes results depe...
54762f3c8b9894d18a6b6162ed7c4613d59f9c9e0e9c645d9f3299582c7c8db2
Rust
24,714
658
//! A file-based [lease](https://en.wikipedia.org/wiki/Lease_(computer_science)) //! for gating concurrent access to a shared local file across independent OS //! processes. //! //! Unlike a plain lock file, a lease has a TTL: if the holder dies without //! releasing it, the lease simply expires and another process can...
656f9d5edfe4d0ab1f4aa83458c07fb1ec06ec07d5b06caa82935065d63731ee
Rust
24,749
820
use serde::{Deserialize, Serialize}; use crate::machinery::Span; use crate::types::iterable::IterableType; use crate::types::list::ListType; use crate::types::utils::CodeLocation; use crate::types::{Object, Type}; use crate::TypecheckingEventListener; use std::collections::BTreeMap; use std::fmt; use std::path::{Path,...
237052109e799941a3962c958cb41c417b7b7757d5880be403236225a9471f64
Rust
24,840
718
use dbt_common::{ io_args::{ BATCH_TESTS_ENV, LOCAL_UNIT_TESTS_ENV, MULTI_ADAPTER_ENV, REQUIRE_REF_SEARCHES_NODE_PACKAGE_BEFORE_ROOT_ENV, SKIP_REDUNDANT_TESTS_ENV, }, tracing::dbt_emit::emit_warn_log_message, }; use dbt_init::{ErrorCode, FsResult, fs_err}; const ENGINE_ENV_PREFIX: &str = "D...
6db36bc0e5c176fb47486395166f90b06fc0cf0fc28ac4239736bfcbc89b2be7
Rust
24,852
645
//! This module contains the scope guard for resolving models. use chrono::TimeZone; use chrono_tz::{Europe::London, Tz}; use dbt_adapter::{AdapterType, load_store::ResultStore}; use dbt_common::io_args::StaticAnalysisKind; use dbt_common::serde_utils::convert_yml_to_dash_map; use dbt_common::{FsResult, dashmap::DashM...
d8f47dd586b86f4d66d0172877b9993972075f3a268c4730126c472a3554c090
Rust
24,967
583
//! Posterior uncertainty: multinomial **bootstrap** (`CollapsedEMOptimizer::gatherBootstraps`) //! and the non-collapsed **Gibbs sampler** (`CollapsedGibbsSampler`). //! //! # Why uncertainty at all //! //! The EM returns a single number per transcript, but that number is not equally //! trustworthy for every transcri...
65efaa551b0eea14f13353f9d14064c9ac110a51b5848356a6f2fc08d0239f63
Rust
24,969
691
use std::{ collections::{BTreeMap, BTreeSet}, sync::Arc, }; use dbt_adapter::load_store::ResultStore; use dbt_common::{ErrorCode, FsResult, fs_err}; use dbt_jinja_ctx::{ DbtNamespace, DocsContext, JinjaObject, MacroLookupContext, ResolveBaseCtx, to_jinja_btreemap, }; use dbt_jinja_vars::ConfiguredVar; use ...
a7d6a86422964eb5d4d6ae0157534af1f8d3cdb9db846f43d80e7c63c345c292
Rust
25,327
715
//! Git package download with host-specific fast paths. //! //! Detects the git hosting provider from the URL and uses the optimal //! strategy for each: //! - **GitHub**: archive download + GraphQL ref resolution //! - **Generic**: git clone + git ls-remote (fallback for any host) //! //! The public API is `download_g...
b28ba70563f83635e7e0f19304375da2b6324efb214545b819723c3b30e58233
Rust
25,441
813
//! The information schema: one `TableSpec` per output table. //! //! This file is the reviewable statement of the schema contract. Reading it //! top to bottom should answer "what columns does `dbt.models` have, and where //! does each one come from". use super::spec::{ColSpec, ColTy, Filter, Ns, Src, TableSpec, c, n...
de520bb024934bbbcec92908d92869efd808ebee8f786175122e8d1bbfb14034
Rust
25,466
690
use dbt_error::ErrorCode; use dbt_telemetry::{ AssetParsed, CompiledCode, CompiledCodeInline, ConnectionLimitWait, DepsAddPackage, DepsAllPackagesInstalled, DepsPackageInstalled, GenericOpExecuted, GenericOpItemProcessed, Invocation, ListItemOutput, LogMessage, NodeEvaluated, NodeOutcome, NodeProcessed, Nod...
bdb9a1117498ce351b2e88bbd90f7d3220004974c20a5d642cb475ba0d84c0f2
Rust
25,697
618
use std::collections::{HashMap, HashSet}; use std::{collections::BTreeMap, sync::Arc}; use dbt_adapter_core::AdapterType; use dbt_common::cancellation::CancellationToken; use dbt_common::path::DbtPath; use dbt_common::static_analysis::{ StaticAnalysisDeprecationOrigin, check_deprecated_static_analysis_kind, }; use...
90276c1afff6f560fd3f25ca43be10e4cad498a0502f5075f8e8fbfb0bb66a15
Rust
25,730
750
use std::borrow::Cow; use std::ffi::c_void; use std::sync::atomic::{AtomicBool, AtomicPtr, Ordering}; use std::sync::Mutex; use minijinja::syntax::SyntaxConfig; use minijinja::value::{Rest, Value}; use minijinja::{context, escape_formatter, AutoEscape, Error, State, UndefinedBehavior}; use pyo3::exceptions::PyRuntimeE...
a984a67f55befcd8b76876f8dd0d766221b171cd398be0c60d80a0a0b1417b01
Rust
25,752
628
//! MEM extraction: extend k-mer anchors into longer exact matches. //! //! # Why extend at all //! //! A k-mer hit says 31 bases matched. But a read that genuinely came from this //! transcript usually matches far more than 31 bases in a row — the hit is just //! the part the index happened to be queried at. Extending...
893e5be04e7a919cd862d951f9ac103adb08e4dd7af1bd393b3429bb1d3d1d1c
Rust
25,757
725
//! https://github.com/databricks/dbt-databricks/blob/main/dbt/adapters/databricks/relation_configs/refresh.py use crate::errors::{AdapterError, AdapterResult}; use crate::relation::config_v2::{ ComponentConfig, ComponentConfigLoader, SimpleComponentConfigImpl, impl_loader, }; use crate::relation::databricks::conf...
675e6b2ffb492bbc0a8b5d533c76fb8a4912a089007f4775b10381d843471136
Rust
25,766
651
//! Cache state construction for the incremental compile path. //! //! This module bridges the parquet-backed parse cache (file mtimes, node snapshots) and //! the in-memory `CacheState` consumed by `resolve_phase` in `dbt-compilation`. //! //! # How CacheState is used //! //! `resolve_phase` receives an `Option<&Cache...
4887798d8261da0f7bb374c583679c924ac706e5a2fbd72eadbfbde306f6c3ae
Rust
25,785
736
use std::borrow::Cow; use std::sync::LazyLock; use crate::AdapterResult; use crate::column::{BigqueryColumnMode, Column}; use crate::errors::{AdapterError, AdapterErrorKind}; use crate::metadata; use crate::sql_types::{self, TypeOps, original_type_string}; use arrow_schema::{DataType, FieldRef}; use dbt_adapter_core::...
4abb9169753f4f5e0b8f78a9a5789200275a9882f94941ba4962debf04ffebf9
Rust
25,916
786
//! Locates installed executables in conventional per-platform locations. use std::{ collections::HashSet, env, ffi::OsStr, path::{Path, PathBuf}, }; #[derive(Clone, Copy)] enum CandidatePlatform { Windows, Unix, } /// Return conventional locations for an installed executable in search order....
1a424207e5aa98c3f7026bab98d3a2aaa02958de0a8d9280cbf0fc3c222de576
Rust
25,930
735
/// Sufficient statistics `[x, x²]` of a univariate Gaussian observation. pub fn sufficient_statistics(x: f64) -> Vec<f64> { vec![x, x * x] } /// Principal branch of the Lambert W function for `z >= 0`. /// /// Solves `w * exp(w) = z` via 6 Halley iterations — the same scheme (and the /// same initial guess `ln(z ...
205c43d9c2bf150db925e6135bc7414e2c7af790dce4ede4bc0d8826d6b3ad7d
Rust
26,161
635
//! Differential test: the view layer against the materialized layer. //! //! [`super::epoch_views`] republishes the information schema as views over the //! epoch files, restating in SQL what `ingest/metadata_to_parquet.rs` does in //! Rust. Roughly 200 of those restatements are a JSON path or a column rename, //! eac...
1ba6ff8b4711a501bc4cccbd6d763796112eb93dc4fb3bab2a5d60c15ee57daa
Rust
26,346
695
//! Assembly of the download-at-install sdist: a tiny `.tar.gz` carrying the //! embedded PEP 517 backend and an `assets.json` manifest of per-platform wheel //! filenames + sha256s. See `templates/sdist_build_backend.py`. use crate::pack::{normalize_wheel_name, render_metadata, target_to_platform_tag, wheel_filename}...
4dce47df008dcb33ff880c83dcc82ad14071dcfdef31cf7f1bf2e15ee6ecb33e
Rust
26,348
756
use crate::{AdapterConfig, Auth, AuthError, AuthWarningPrinter, auth_configure_pipeline}; use dbt_adbc::{Backend, database, spark}; pub use dbt_yaml::Value as YmlValue; use std::collections::HashMap; #[derive(Debug)] enum SparkPlatformHint { None, AwsEmrServerless, AwsEmrEks, } #[derive(Debug)] enum Thri...
cbaa2e2552d89178614ac8d8b31e8663ec732ee499e56c73b31b626ec9150dda
Rust
26,501
608
//! Output writers: `quant.sf`, `cmd_info.json`, `lib_format_counts.json`, //! `aux_info/meta_info.json`, `libParams/flenDist.txt`, and `logs/salmon_quant.log`. //! Functional parity with salmon's column/field layout, including the binary //! aux dumps (`aux_info/fld.gz` and the observed/expected bias models) and the /...
0d2084fc8006e9aaeb524f089a9ca03f7048da33450ce64ff1060fbb36fe8642
Rust
26,712
808
use std::collections::BTreeMap; use std::fmt; use serde::{Deserialize, Serialize}; /// Results of `DESCRIBE TABLE EXTENDED {database}.{schema}.{identifier} AS JSON;` /// https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-table #[derive(Debug, Serialize, Deserialize, Clone, Default)] #[...
37aec1e20cacc5c2ca2f18b67c0ccbf4a1202a0f8a4bf6f1be1719e447d005d0
Rust
26,886
797
//! Python/agate-compatible type tester module for CSV schema inference. //! //! This module implements type inference that matches Python's dbt/agate behavior. //! Types are tested in priority order, and the first matching type is used. //! //! # Type Priority (from agate_helper.py's build_type_tester): //! 0. **Null*...
42109b1fcd399914f8f34bbdb1c6e46a066ce10d356f5e0f3549276df119ad40
Rust
27,207
747
use std::cmp::Ordering; use std::fmt; use std::sync::Arc; use chrono::{Datelike, Local, NaiveDate, NaiveDateTime, TimeZone, Weekday}; use minijinja::arg_utils::{ArgParser, ArgsIter}; use minijinja::{ value::{DynObject, Object, ObjectRepr}, Error, ErrorKind, Value, }; use super::find_microsecond_directive; use...
d5b3f69c291112823c193f1ce3be208154900e9c7b39e51a7ab0d2b87157157a
Rust
27,246
900
use crate::dialect::Dialect; use crate::error::InternalError; use crate::utils::{get_version_hash, strip_version_hash}; use crate::{internal_err, make_internal_err}; use datafusion_common::{ResolvedTableReference, TableReference}; use itertools::Itertools; use serde::{Deserialize, Deserializer, Serialize, de}; use std:...
8b97411e16da20eed8d820bc43ba08592d85d1e30384318671b857dc6055abab
Rust
27,509
668
use crate::arg_utils::ArgParser; use crate::constants::DIALECT; use crate::constants::MACRO_DISPATCH_ORDER; use crate::constants::TARGET_PACKAGE_NAME; use crate::listener::RenderingEventListener; use crate::machinery::Span; use crate::value::Enumerator; use crate::value::Object; use crate::value::{value_map_with_capaci...
d873b5a857300b3320d7d5b9b928eb02671500611a403609f8a7bce6bef900b8
Rust
27,588
719
use std::borrow::Cow; use std::path::PathBuf; use std::sync::Arc; use super::{ dbt_init::init_tracing_with_layers, fs_error_log::get_log_message, layers::{ file_log_layer::build_file_log_layer_with_background_writer, json_compat_layer::{ build_json_compat_layer, build_json_compa...
c5aa7af7c151a6c44dc33c7c291d3f9e5729987e6707c4662788170bc52c6d3e
Rust
27,668
708
//! A mini-framework for running parallel Key-to-Value tasks over a bounded //! number of workers in dbt-runtime and reducing the results. use dbt_adbc::Connection; use dbt_base::cancel::{Cancellable, CancellationToken, CancelledError}; use dbt_runtime::{Handle, JoinHandle}; use futures::FutureExt; use futures::stream...
d1aecf365a6e35c22ba8c58784b319f03396f7d30d18900509b5e759a3e50131
Rust
27,767
711
use crate::args::ResolveArgs; use crate::dbt_project_config::ProjectConfigResolver; use crate::dbt_project_config::RootProjectConfigs; use crate::dbt_project_config::disallow_plus_prefix_from_flags; use crate::dbt_project_config::init_project_config; use crate::renderer::strip_warehouse_keys_in_config_block; use crate:...
d9018da36b0b92647d545e021d687fa289d2e90b50b3a03901c5d1d760160a99
Rust
27,782
748
use crate::adapter_config::{ setup_bigquery_profile, setup_clickhouse_profile, setup_databricks_profile, setup_exasol_profile, setup_fabric_profile, setup_postgres_profile, setup_redshift_profile, setup_snowflake_profile, }; // Re-exported so `crate::profile_setup::{ProfileTarget, Profiles}` keeps resolving...
306a575ae54086af2656bb9f0a3ed01e63d59754cbb1b660fc1c6929ec0d9283
Rust
27,783
691
//! Arrow record batch with only flat columns //! //! use arrow::array::PrimitiveBuilder; use arrow::array::{ Array, DictionaryArray, GenericListArray, OffsetSizeTrait, RecordBatch, RecordBatchOptions, StructArray, }; use arrow::compute::CastOptions; use arrow::datatypes::Int64Type; use arrow_data::ArrayData; ...
63aaf069a247dd6a3f6db6c08f44641f4101eb0ec27a9204bc6cd4537ee1addb
Rust
27,864
780
//! Provides the machineries to deserialize and process dbt YAML files. //! //! # Basic primitives //! //! * [`value_from_str()`]: this function creates a `yaml::Value` from a Yaml //! string, with proper warnings for duplicate keys //! * [`into_typed_with_jinja<T>`]: this function consumes a `yaml::Value` to //! c...
1341bf75223c63c5cc385d8aa8850a3bf70dc96066ea11167879542bed723556
Rust
27,908
872
use std::{ collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque}, hash::Hash, }; use itertools::Itertools; pub fn reverse<T, U>(dependencies: &BTreeMap<T, BTreeSet<U>>) -> BTreeMap<U, BTreeSet<T>> where T: Hash + PartialEq + Eq + Clone + Ord, U: Hash + PartialEq + Eq + Clone + Ord, ...
549b620fa27c08fa782972d8c506172d4bb81a5b53e4d28e4dd1c3942bdae9be
Rust
28,021
747
//! ADBC Driver //! //! use crate::Database; use crate::database::AdbcDatabase; use crate::driver_manager::ManagedDriver as ManagedAdbcDriver; use crate::install::{self, DriverTriplet, build_http_agent}; use adbc_core::{ Driver as _, LOAD_FLAG_ALLOW_RELATIVE_PATHS, LOAD_FLAG_DEFAULT, LOAD_FLAG_SEARCH_ENV, LOAD...
40efa0be5457749cdacf1a2ad93db40186d0ae3398e03db9f9d9867e6125152e
Rust
28,042
720
//! Scoring, deduplication, and filtering of validated mappings. //! //! # The last stage //! //! Alignment leaves a pile of scored placements, possibly several per transcript //! and including decoys. This module reduces that to what the statistical model //! consumes: at most one mapping per transcript, decoys remove...
e2a642d6be13b3d1dd71e26acec19b95869e3c6a3a3c4a356d1c373c6f8d883c
Rust
28,194
822
use std::{ borrow::{Borrow, Cow}, ffi::{OsStr, OsString}, fmt::Debug, hash::Hash, ops::Deref, path::{Component, Display, Path, PathBuf}, }; /// Compute the `target/compiled` or `target/run` output path for a snapshot node. /// /// Snapshots always use the many-to-one nested layout: `out_dir/pac...
c0d2b8b1f732d1f81da868f0cc7aad6b1f717f6399ddc4030045dc66082fc15f
Rust
28,256
667
use dbt_adapter_core::AdapterType; use dbt_cloud_api::{ apis::{configuration::Configuration, connections_api, users_api, whoami_api}, models, }; use dbt_common::tracing::dbt_emit::{ emit_debug_log_message, emit_info_log_message, emit_warn_log_message, }; use dbt_common::{ErrorCode, FsResult, fs_err}; use db...
5e3ed9963576b8ab4fdc593ed97b1d68e5b052b09b324c133b65abfcb3070ab0
Rust
28,907
751
//! Genome-alignment quantification via bramble projection. //! //! # The problem this solves //! //! salmon quantifies transcripts, so it needs to know where a read sits *within a //! transcript*. A genome aligner instead reports where the read sits on a //! chromosome, often spanning an intron. Those are different co...
fc172d79203cddb963bda6879efbe85efe445f033d836f27813b6183c1979b8b
Rust
28,996
808
//! Parsed representations of dbt node payload types stored in `parse/nodes` parquet. //! //! Both `metadata_to_duckdb` (SQL upsert path) and `metadata_to_parquet` (Arrow write //! path) extract the same fields from the same JSON payload keys. This module owns that //! extraction once; each consumer converts the result...
bac171ede000c882a3aefe8a4f73d10d300565cc8c39bae35da3ded142f307ce
Rust
29,169
817
use std::collections::BTreeMap; use std::sync::Arc; use dbt_adapter::relation::RelationObject; use dbt_adapter_core::AdapterType; use dbt_jinja_utils::mock_object::MockJinjaObject; use dbt_schemas::dbt_types::RelationType; use minijinja::Value; use minijinja::dispatch_object::DispatchObject; use crate::macro_test_har...
a970890a5e7fa3a11211c560c23f5899d8386944429d39fd0e517e7b05b15d63
Rust
29,370
665
//! RAD-format schema, record types, and writer for salmon (libradicl-backed). //! //! # What RAD is //! //! RAD ("Reduced Alignment Data") is a compact binary file format from the //! COMBINE-lab tool family. Instead of a full SAM/BAM alignment record per read //! — read name, sequence, qualities, CIGAR string, all of...
e5971cc00ec4707f958a79124647226160d23de7bbb36ceaf6172a06c91a7a4d
Rust
29,452
843
use sprintf::parser::ConversionType; use sprintf::{vsprintf, ConversionSpecifier, Printf, PrintfError}; use std::slice; use crate::error::{Error, ErrorKind}; use crate::value::{DynObject, ObjectRepr, Value, ValueKind, ValueRepr}; use super::mutable_vec; const MIN_I128_AS_POS_U128: u128 = 1701411834604692317316873037...
3e8ae27408eebdd730e51df2c8d31a3156f1c5bff4ba09e7dc611053df4ac7e9
Rust
29,778
943
use crate::AdapterResponse; use crate::adapter::adapter_impl::AdapterImpl; use dbt_adbc::{Connection, QueryCtx}; use dbt_common::tracing::dbt_emit::emit_warn_log_message; use dbt_common::{AdapterError, AdapterErrorKind, AdapterResult, ErrorCode}; use minijinja::{State, Value}; use serde_json::json; mod api_client; us...
8e7c13be46d4d5eebb06990fe6383bed14efbf84953a46583a89eb3d91f169dd
Rust
29,859
782
use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet}; use std::sync::Arc; use adbc_core::options::{OptionStatement, OptionValue}; use arrow_array::RecordBatch; use arrow_schema::Schema; use dbt_adbc::bigquery::QUERY_LABELS; use dbt_adbc::{Backend, Connection, QueryCtx, Statement}; use dbt_auth::AdapterConf...
8e6114fdc9daa5ad3cbbb237e19ad843afc533c40c852a2c3dd5d9a30c703b2b
Rust
30,031
652
use crate::model::network::Network; /// Principal branch of the Lambert W function for z >= 0. /// Solves w * exp(w) = z via 6 Halley iterations. fn lambert_w0(z: f64) -> f64 { let mut w = (z + 1.0).ln(); for _ in 0..6 { let ew = w.exp(); let f = w * ew - z; let f1 = (w + 1.0) * ew; ...
341abb0acc8ae3dc5f746d347d317f997b51bc8bba4fec6c0ee856bca94970f0
Rust
30,043
754
use crate::args::ResolveArgs; use crate::dbt_project_config::{ ProjectConfigResolver, RootProjectConfigs, disallow_plus_prefix_from_flags, init_project_config, }; use crate::resolve::resolve_utils::build_unrendered_config; use crate::resolve::resolve_utils::extract_config_map; use crate::utils::{ extract_resour...
f9b9a14b1f0795d83cd17aeb5bef3298fae34a1b4b3e30598fa228e6d1c386c6
Rust
30,293
851
use arrow_array::RecordBatch; use dbt_adapter_core::AdapterType; use dbt_adbc as adbc; use dbt_agate::AgateTable; use minijinja::listener::RenderingEventListener; use minijinja::value::{Enumerator, Object, ValueMap}; use minijinja::{State, Value}; use serde::de::Deserializer; use serde::ser::Serializer; use serde::{Des...
b0b3c4072a92a281a678e5e72f6aa233b7fa8b55070227293a8a9409c49d28af
Rust
30,426
782
//! The assembled selective-alignment mapper. //! //! # The per-fragment pipeline //! //! This is the entry point [`salmon_quant`](../salmon_quant/index.html) calls //! once per fragment, and it runs the whole staged process end to end: //! //! ```text //! read(s) ─► seed + anchor ─► chain ─► pair ─► align ─► score/f...
5e6aa2aaa50000217ed691c3e107c8893c2ad7c4bff92b01c4df512f23b45603
Rust
30,430
794
//! The views a parse-time check reads: the information schema's vocabulary, //! computed live over the metadata this run parsed. //! //! A project quality check is SQL that runs **at parse time**, so it cannot read the //! materialized information schema — that is written after parse, and only when asked //! for. It r...
8530ef7c7e62dbafa95d2e70e3ea6d53fe942857a5a2f584b8d16ab58235235f
Rust
30,437
749
//! Columnar layer representation for the vectorised deep-network backend. //! //! This mirrors the Equinox PyTree types of the JAX vectorised backend //! (`pyhgf.typing.vectorised`) so the two backends can be checked for //! numerical parity. A whole layer of HGF nodes is stored **columnar** — one //! [`Vector`] per b...
958cf76aa982f7af8c0d6e3c1d3112899abc4f6a1a0e62b97a0ccf5462eec36a
Rust
30,817
842
//! Renders a Homebrew formula from pre-built release tarballs. //! //! Inputs: //! - A directory of `{prefix}{version}-{target}.tar.gz` tarballs (one per //! cargo target triple). //! - A URL template that resolves to the public download URL of each tarball. //! - PEP 621 metadata from the workspace `pyproje...
9a3e53a42e5f7e231ee0c831c8729fdeeeaec3fa0735e97f4e3325642e9ce5ed
Rust
31,165
828
//! This module contains the scope for materializing nodes use std::collections::BTreeMap; use std::collections::BTreeSet; use std::fs; use std::path::{Path, PathBuf}; use std::rc::Rc; use std::sync::Arc; use dbt_adapter_core::AdapterType; use dbt_agate::AgateTable; use dbt_common::ErrorCode; use dbt_common::io_args:...
a32079bad0161bdda81996c1752d58dbd0ec5d0497c0ea79a88f86305bee22ca
Rust
31,237
853
mod token_service; use crate::{AdapterConfig, Auth, AuthError, AuthWarningPrinter, auth_configure_pipeline}; use database::Builder as DatabaseBuilder; use crate::redshift::token_service::{TokenEndpoint, create_token_service_client}; use adbc_core::constants::ADBC_OPTION_USERNAME; use dbt_adbc::redshift::{ AUTH_ID...
616edc6d7326a571fa9e1bb855411adc578c43894a8c80a380ec59659f0bdc10
Rust
31,534
942
use crate::args::PypiPublishArgs; use crate::pack::normalize_wheel_name; use crate::pyproject; use crate::release_version::{semver_to_pep440, validate_release_version}; use crate::sdist::build_release_sdist; use crate::utils::{backoff, cargo_workspace_root, is_transient, sha256_hex}; use anyhow::{Context, Result, anyho...
23ff4e08d9d898f9403047120f5aa16280683b5cb81e511538454a0c91672385
Rust
31,700
762
//! Transcript→gene mapping and gene-level aggregation (`-g/--geneMap` → //! `quant.genes.sf`), matching salmon's `aggregateEstimatesToGeneLevel`. //! //! # Why aggregate at all //! //! salmon quantifies *transcripts* (isoforms), but many analyses want one number //! per *gene*. A gene typically has several isoforms, s...
52ba449082d77c78d05833b4ee590f758df6545d2d864bac1d612d452cd47749
Rust
31,915
878
use proc_macro2::{Span, TokenStream, TokenTree}; use quote::{ToTokens, quote, quote_spanned}; use syn::parse::{Parse, ParseStream, Parser}; use syn::{Attribute, Ident, Path, Signature, Visibility, braced}; // syn::AttributeArgs does not implement syn::Parse type AttributeArgs = syn::punctuated::Punctuated<syn::Meta, s...