sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
98942bf748723f0b5dd14ba3df04a6f5f07b555fcc6366ac5998dd14c98035d1 | Rust | 3,668 | 93 | use dbt_telemetry::{Invocation, InvocationEvalArgs, create_process_event_data};
use dbt_tracing::TelemetryAttributes;
use crate::{io_args::EvalArgs, tracing::span_info::with_root_span};
fn create_invocation_eval_args(eval_arg: &EvalArgs) -> InvocationEvalArgs {
InvocationEvalArgs {
command: eval_arg.comma... |
ff52a914630a1fbc8c0e4e9734a2625dd1be8e6f3110c9fdac79d69e8738d4da | Rust | 3,687 | 89 | //! Lock-free `f64` accumulation, used for concurrent mass/count updates.
use crate::math::log_add;
use std::sync::atomic::{AtomicU64, Ordering};
/// An `f64` stored as its bit pattern in an `AtomicU64`, supporting lock-free
/// updates via a CAS loop. Salmon updates per-transcript mass and the fragment
/// length di... |
c8dc082bcc273037dcd760f76766db55c088c712f051198af59653a153d0d534 | Rust | 3,699 | 141 | use crate::{
types::{
function::{ArgSpec, FunctionType},
list::ListType,
Type,
},
TypecheckingEventListener,
};
use std::rc::Rc;
#[derive(Debug, Default, Eq, PartialEq, Clone)]
pub struct StringStripFunction {}
impl FunctionType for StringStripFunction {
fn _resolve_arguments(
... |
9d8364389615fef64423c6d5a58d7dedf9cf50f6f8235ce8b9aa8b78bcfdc9a2 | Rust | 3,718 | 76 | //! This module contains the resources that are encountered while rendering sql and macros.
use std::fmt::Debug;
use dbt_schemas::schemas::project::ResolvableConfig;
use dbt_schemas::schemas::serde::NodeVersion;
use dbt_frontend_common::error::CodeLocation;
use minijinja::{ArgSpec, machinery::Span};
/// Resources t... |
9abfa6b96ff4bb88f147faee4ca1169193cb35ed149d980fc3db2dd160b10040 | Rust | 3,735 | 108 | use crate::AdapterEngine;
use crate::adapter::adapter_impl::*;
use crate::errors::{AdapterResult, AsyncAdapterResult};
use crate::metadata::*;
use arrow_array::RecordBatch;
use arrow_schema::Schema;
use dbt_adapter_core::ExecutionPhase;
use dbt_common::cancellation::CancellationToken;
use dbt_schemas::schemas::relation... |
7a97f3f043e628a72a3a5ede5d7130c892eec62d49122257638bb6d053990dd8 | Rust | 3,767 | 108 | //! Tests covering `LoadCtx` end-to-end:
//!
//! 1. The typed ctx serializes to exactly the same key set today's hand-built
//! `BTreeMap` does in `phases/load/init.rs` — `run_started_at` + `target` +
//! `flags`.
//! 2. The Object identity of `run_started_at` (a `JinjaObject<PyDateTime>`)
//! survives the ser... |
b904c5cc9c931fb0a6a6ba9dd51536b61fad717f285fd1848b04b35bf2a5b998 | Rust | 3,778 | 105 | //! Adam optimiser for the per-node backend's coupling-weight updates.
/// Adam optimiser state for filtering coupling weight updates.
///
/// Maintains per-weight first moment (m) and second moment (v) estimates,
/// following Kingma & Ba (2015).
#[derive(Debug, Clone)]
pub struct AdamState {
/// First moment vec... |
cd9321d3bb5d455a81416016515e4cb1d22c5bb290a66499ca38fa6b2b1ce1b8 | Rust | 3,798 | 143 | use std::{collections::BTreeMap, rc::Rc, sync::Arc};
use crate::{
types::{
function::{ArgSpec, FunctionType},
DynObject, Object, Type,
},
TypecheckingEventListener,
};
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ListType {
pub element: Box<Type>,
}
impl Li... |
9aff56920656df0d41f50b5ead9e9749aa3b6c621bca9c5729924f3a4ef25c15 | Rust | 3,799 | 107 | use crate::compiler::typecheck::FunctionRegistry;
use crate::types::function::{ArgSpec, FunctionType};
use crate::types::Type;
use crate::TypecheckingEventListener;
use std::rc::Rc;
use std::sync::{Arc, Mutex, OnceLock};
#[derive(Clone)]
/// AdapterDispatchFunction is a singleton that type check adapter.dispatch
pub s... |
d2a9b03c4408ce606ceb8e80cf8e5929309fcd96cd4133f5989114c1251835e3 | Rust | 3,806 | 139 | //! Declarative description of the information schema.
//!
//! Each output table is described once, as a list of output columns paired with
//! the source column they are taken from. The output Arrow type is *derived*
//! from the source field rather than restated here, so a rename cannot change a
//! column's type by ... |
8b811a1b994e75c09f490e9a6a127fc6e01d8e9ee1e64380b2e20ed1cf83e26f | Rust | 3,826 | 94 | use dbt_adapter_core::AdapterType;
/// Returns a sorted slice of reserved keywords for the given adapter type.
pub fn reserved_keywords(backend: AdapterType) -> &'static [&'static str] {
use AdapterType::*;
use dbt_sql_keywords::*;
match backend {
Snowflake => snowflake::RESERVED_KEYWORDS,
... |
c817afdc79334e303c41cb9b68edf5ef80f4898b23b6fcd8647db78ab515aa31 | Rust | 3,835 | 95 | /*
* dbt Cloud API v3
*
* The version of the OpenAPI document: 3.0.0
* Contact: support@getdbt.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProjectResponse {
#[serd... |
2d73877e6b3a8666136d6f6dbb8e0232a1fed605ede7c23c7a68034f590e228a | Rust | 3,842 | 104 | use std::collections::HashSet;
use std::sync::Arc;
use std::time::SystemTime;
use async_trait::async_trait;
use dbt_adapter_core::AdapterType;
use dbt_clap_core::Cli;
use dbt_common::{FsResult, cancellation::CancellationToken, io_args::EvalArgs, path::DbtPath};
use dbt_dag::schedule::Schedule;
use dbt_jinja_utils::{
... |
7006a4348ee02b0eadfe438f983d7c36d1bc1df5190803a90835b554acc5ed17 | Rust | 3,843 | 118 | //! Table fixtures shared by the tests of this crate.
use std::sync::Arc;
use arrow::record_batch::RecordBatch;
use arrow_array::{Int64Array, StringArray};
use arrow_schema::{DataType, Field, Schema};
use crate::AgateTable;
/// | id: i64 NOT NULL | name: str NOT NULL | fk: i64 |
pub fn main_table(id: &[i64], name: ... |
5d482b19b315e12edb4ba6a68492456c45c593937901408cc4b74ea2ff91866f | Rust | 3,866 | 110 | //! Times the alignment kernel in isolation.
//!
//! Alignment is the expensive stage of mapping, but in a real run it is
//! entangled with seeding and chaining, so measuring it alone is the only way to
//! attribute a change to the kernel itself. Both paths salmon can take are
//! measured: the default anchored ksw2 ... |
a251510bf9cb99b0a3a9c08a5a4db2e1557ede672b6d7419bea11e9c2fbcace5 | Rust | 3,901 | 100 | //! Opting a backend into its ADBC Driver Foundry driver.
//!
//! ```text
//! DBT_ADBC_BIGQUERY_USE_FOUNDRY=1
//! ```
//!
//! The Foundry build is published under its own name (`bigquery_foundry`), so
//! it has separate CDN paths, cache files and checksums from the canonical
//! driver and either can be rolled back wi... |
f2d0ab0f03951e92a284c3cea1a1e75692edf0c80b6ab92abb1b1ca00906230e | Rust | 3,911 | 99 | use std::time::SystemTime;
use dbt_common::{FsError, FsResult};
use dbt_platform_auth::{AuthChainBuilder, AuthError, Credential, OAUTH_CLIENT_ID, ResolverKind};
pub async fn execute_login_status() -> FsResult<()> {
match AuthChainBuilder::new(OAUTH_CLIENT_ID)
.build()
.resolve_with_source()
... |
24d4490eb58feb0d4c34dc9e5ecd8ff1f72567a5b75a9500488b21020c25771b | Rust | 3,919 | 82 | //! `salmon-map`: selective-alignment mapping for the salmon Rust port.
//!
//! # What "mapping" has to decide
//!
//! For each sequenced fragment, which transcripts could it have come from, and
//! how well does it fit each one? Answering that for hundreds of millions of
//! fragments against a hundred thousand transc... |
cbb211fc1a0e0d54f0e4fc8c4f403d54f14f0b31d970da7e77be4cddc9af2181 | Rust | 3,933 | 127 | use std::collections::BTreeMap;
use dbt_adapter_core::AdapterType;
use minijinja::{Environment, Error, ErrorKind, Value, context};
use minijinja_contrib::pycompat::unknown_method_callback;
use serde_json::{Value as JsonValue, json};
use super::QueryCommentConfig;
fn target() -> BTreeMap<String, Value> {
BTreeMap... |
6a15929dfe52d439462961c1426be52a5f0a04033f24891f4c30f2fad939d50c | Rust | 3,956 | 112 | use crate::{jinja_environment::JinjaEnv, listener};
use dbt_adapter::AdapterType;
use dbt_common::{
ErrorCode, FsError, FsResult, io_args::IoArgs, path::DbtPath,
tracing::dbt_emit::emit_error_log_message,
};
use minijinja::{
AdapterDispatchFunction, ErrorKind, Value,
compiler::codegen::CodeGenerationPro... |
1c70f0026b9122c70f9837ac8e419e61aab23431efa03e831c8922dc9b1ab3c9 | Rust | 3,969 | 29 | /*
* 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... |
a2d0a12b1050765b1165dfbcce53f5d62250230c4fa54d7e2906a71ed85e1dd6 | Rust | 3,977 | 28 | /*
* 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... |
b9f8d2b7776cb2696e47b03085bfdfd3d05296fe3ac3839846af1c153186dfb0 | Rust | 4,024 | 123 | use dbt_common::{AdapterError, AdapterResult};
use dbt_schemas::schemas::{DbtModel, InternalDbtNodeAttributes};
use minijinja::Value;
use crate::relation::snowflake::config::{
SnowflakeDescribeResults, get_bool_by_name_from_record_batch,
};
use crate::{
relation::config_v2::{
ComponentConfig, Component... |
1875289ce2faf19d913529a8943a1d85eaae4b1393038ca716bfc4bf35a53ca1 | Rust | 4,068 | 28 | /*
* 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... |
b8d47ce0ea1a4d047549e55d138a5776391070ec14382d7f7836cccff2d027bd | Rust | 4,075 | 34 | /*
* 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... |
09249be6208f758002b572e19202b6a7855805e45fd62ca9b5bd4de22fd09507 | Rust | 4,082 | 134 | //! The dbt adapter layer.
#![allow(clippy::let_and_return)]
use dbt_common::ErrorCode;
mod macro_exec;
mod value;
pub mod adapter;
pub mod cache;
pub mod catalog_relation;
pub mod column;
/// Connection management: the per-worker-thread connection and its guard.
pub mod connection;
pub mod engine;
pub mod errors;
... |
b99fbf644aea9cf5c2efeb638d1ce037933e84fedad5093a4cbce0a19838b376 | Rust | 4,084 | 126 | 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... |
7bdbbf72461bd0dd751760273e78a02d43241b12e220e06b5e5d047b4a6613b7 | Rust | 4,086 | 124 | use std::sync::Arc;
use std::time::SystemTime;
use dbt_clap_core::Cli;
use dbt_common::{FsResult, cancellation::CancellationToken, io_args::EvalArgs};
use dbt_compilation::schedule::DbtProjectCompilationCacheChanges;
use dbt_compilation::traits::{CompilationCache, CompilationDriver, CompiledProject};
use dbt_compilati... |
c7858843db3dcbb1555c726bd1376441ab1525a1c2cdea5d95e0f7140e69b470 | Rust | 4,086 | 34 | /*
* 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... |
e0cdf48d24b55d37225209734d645b1bbeffb1e1cde49aa31e79d993bf87189f | Rust | 4,090 | 28 | /*
* 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... |
cc09d52f6ee1b41f6b85ea89796a9952a50be0d3c882dda0c8b03bee91c15d6b | Rust | 4,105 | 115 | use arrow::datatypes::DataType;
/// Returns a readable, concise representation of the given data type from Fusion's implicit
/// universal type system. Does not conflate type options that could have different semantics
/// in the code (either intentionally, or due to a bug or missing feature). The returned string
/// ... |
18295a49aa7f22e34097d53a5f0c8c312049cae2957f2d19ed1eedc4691bd721 | Rust | 4,112 | 28 | /*
* 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... |
a8eb1148aba1d05f13809795b83900a376cce827447f40718f27912e0b34404f | Rust | 4,119 | 111 | //! Installing agent skills once packages are on disk.
//!
//! This runs as part of package installation rather than as a separate command,
//! so skills land at the same moment the packages that ship them do. It reads
//! only files on disk — no profile, no warehouse connection, no manifest.
use std::path::Path;
use... |
5c6a899ffe85b1eb50085540628d66af72d8d0bb0e787bf7ea79a15f4cbfc184 | Rust | 4,127 | 126 | 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... |
11876a96719190a63d179862dfb4f0ed1c54065a49ba0e10dc75654b8cf4fd4b | Rust | 4,130 | 107 | use dbt_common::{AdapterError, AdapterResult};
use dbt_schemas::schemas::nodes::SnowflakeAttr;
use dbt_schemas::schemas::{DbtModel, InternalDbtNodeAttributes};
pub(super) fn snowflake_attr(
relation_config: &dyn InternalDbtNodeAttributes,
) -> AdapterResult<&SnowflakeAttr> {
relation_config
.as_any()
... |
08367be4ebb6fc201b3c628c9252fe6c7ab3edc891d4b654023fd08d96a200bc | Rust | 4,143 | 126 | use dbt_common::{AdapterError, AdapterResult};
use dbt_schemas::schemas::{DbtModel, InternalDbtNodeAttributes};
use minijinja::Value;
use crate::relation::snowflake::config::{
SnowflakeDescribeResults, get_string_by_name_from_record_batch,
};
use crate::{
relation::config_v2::{
ComponentConfig, Compone... |
769aad297593da8e1e86a7efb0839f39241b0a4a12a18a8c604bf2c1f2fd46d5 | Rust | 4,155 | 140 | use minijinja::Value;
use std::{any::Any, collections::BTreeMap, fmt, sync::Arc};
/// Represents a changeset composed of [ComponentConfig] structs
pub trait RelationChangeSet: Send + Sync + fmt::Debug {
fn changes(&self) -> &BTreeMap<String, Arc<dyn ComponentConfig>>;
fn requires_full_refresh(&self) -> bool;
... |
47e2e14e66432f521489236e29537f22b2bf84be52c00fdba9278c6a445494cc | Rust | 4,159 | 32 | /*
* 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... |
2bc08843f97b4db7e0069f496070c9d786516e1815d3a0c553fa5c3f03952b95 | Rust | 4,201 | 35 | /*
* 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... |
915ec7af29a45ef39c517738c6c5dcdf14d34d3e3b7284beb26a0a1b53043242 | Rust | 4,201 | 35 | /*
* 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... |
4180b5045417f27a54bb58e1b8ac6d6f8f700fc8162f248087b25ca55140c945 | Rust | 4,209 | 34 | /*
* 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... |
9a78cc1729f034541438eb0377c6a7e473fe67a2e6cd3d33f50df948521aa24e | Rust | 4,209 | 34 | /*
* 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... |
85f5463a7045ef2585219704ebc2d329e0a28414fedfcaa4af6bec74c4aeaf52 | Rust | 4,214 | 129 | use std::time::{Duration, SystemTime};
use chrono::{DateTime, Utc};
/// Format elapsed duration for final invocation summaries.
///
/// The formatting targets a compact single token suitable for `[<value>]` blocks,
/// matching the desired UX in the run result output.
pub fn format_duration_for_summary(duration: Dura... |
6741eb1d2042ebd06b12f724302f0bcd9bc24dc956931b62b4c19baaec6f5429 | Rust | 4,223 | 48 | /*
* 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... |
25997b8f1414db199bc04fce50d69035f7c9b73eaf88f0cf7705cc4a307ac092 | Rust | 4,229 | 34 | /*
* 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... |
befd9cf31c40eb296260434ae725eed4e130aeaf3e66145788124bdb471fff3f | Rust | 4,230 | 133 | use rshgf::model::network::Network;
/// Helper to check approximate equality of f64 values
fn assert_close(actual: f64, expected: f64, label: &str) {
let tol = 1e-5;
assert!(
(actual - expected).abs() < tol,
"{}: expected {}, got {} (diff = {})",
label,
expected,
actual,... |
cfffa6bcb302d8204737c4581de4869cb3268e74a12f894ccd630f1101aee5f3 | Rust | 4,233 | 125 | use crate::{AuthError, Credential};
/// Resolves credentials from environment variables.
///
/// Reads:
/// - `DBT_CLOUD_ACCOUNT_HOST`
/// - `DBT_CLOUD_TOKEN`
/// - `DBT_CLOUD_ACCOUNT_ID`
///
/// All three must be present and non-empty. The token prefix determines the credential
/// type: `dbtu_` → `Pat`, anything els... |
455dc0fce92e90193c2bbf81188f80c8276d21d4bf8cf15da5bad2cf1f462c38 | Rust | 4,237 | 98 | //! Phase-core ctx structs.
//!
//! [`GlobalCore`] is the typed shape of the three Jinja globals available on
//! every dbt jinja env from the load phase onwards: `run_started_at`,
//! `target`, `flags`. Every later phase's outer ctx flattens this core via
//! `#[serde(flatten)]` and adds phase-specific fields.
//!
//!... |
5007392980d65fe88327e1bea7a0aaf1c21883309222e389e4d3781663b59a5d | Rust | 4,242 | 36 | /*
* 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... |
fa11b606cd188570a92e2087705b7f52208a4b9cb5b3eab9be389bd348522006 | Rust | 4,247 | 34 | /*
* 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... |
579f72a49c62606eed1e33854df1fbacc95dab233aed55e385323ee236f471fa | Rust | 4,258 | 36 | /*
* 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... |
eeed319ca8b91bdbea0237c942d13c2e75fd3a12b91a7544c7f0b25c356aff00 | Rust | 4,269 | 126 | //! Snapshot parquet for parse/alive — the authority on node liveness.
//!
//! Files land at:
//! ```text
//! target/
//! metadata/parse/alive.parquet ← snapshot, rewritten every parse
//! ```
//!
//! ## Design
//! * **Snapshot** — full overwrite every parse. No epoch logic needed.
//! * **Authority** — a node is a... |
27fb51084821dd5befac93862c2989c94c189e2db4352a16fcead61b2891881a | Rust | 4,273 | 38 | /*
* 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... |
52d135e4d6e016edb953b06a29b99786d737efb7698e487ae0727b06009f72c3 | Rust | 4,277 | 114 | use std::env;
const VERSION_CHECK_DISABLED_ENV: &str = "DBT_DISABLE_VERSION_CHECK";
pub async fn check_version(current_version: &str, cdn_url: Option<&str>) -> Option<String> {
// Skip check if disabled via env var
#[allow(clippy::disallowed_methods)]
if env::var(VERSION_CHECK_DISABLED_ENV).is_ok() {
... |
cf5a9ca8e490c2a2ee2f885c900c56fe271875fdd957ae1cfaa40db2f911fe9a | Rust | 4,286 | 35 | /*
* 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... |
84f8c4ac52e2af15c5f86937f93f583f78bdfd225c49ef39fb0bc5d1b0e0cde8 | Rust | 4,346 | 129 | //! Legacy file-based storage (Arrow IPC / Parquet).
//!
//! Deprecated: all new recordings use SQLite. This module exists only to
//! read recordings created before the SQLite migration.
use arrow::array::{RecordBatch, RecordBatchIterator, RecordBatchReader};
use arrow::ipc::reader::FileReader as ArrowFileReader;
use... |
1c1bc5051c0a4cab7908918eecdd78bb8a2f78fb82e2e25b08be700a3d642e53 | Rust | 4,361 | 99 | use crate::{
model::network::Network,
updates::nodalised::{
posterior::continuous::{
posterior_update_continuous_state_node, posterior_update_continuous_state_node_ehgf,
posterior_update_continuous_state_node_ehgf_mean_field,
posterior_update_continuous_state_node_mea... |
330ade9a4c82ac6371ebf2582cd82d5f15e1adc750adf3541d3ad0aa63b35e05 | Rust | 4,386 | 35 | /*
* 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... |
edd1a94acc7daf5cff693538ec71453da8a30fa85536953bea9b7b183d59b493 | Rust | 4,387 | 91 | //! Option keys for the lake compute ADBC driver.
//!
//! These mirror the keys understood by the `adbc_driver_dbt` driver crate (its
//! `options` module). They are kept in sync by convention — the same way the
//! other backend modules (e.g. [`crate::snowflake`]) mirror the keys expected by
//! their respective drive... |
f514624e4b5b909f786461adcd7f3a451df77b7fb4ec1ab7acb5ef974404ca6c | Rust | 4,400 | 142 | pub(crate) mod error;
mod naming;
mod record;
mod replay;
mod storage;
pub use naming::cleanup_schema_name;
pub use record::RecordConnection;
pub use replay::ReplayConnection;
use adbc_core::options::OptionValue;
use dashmap::{DashMap, DashSet};
use once_cell::sync::Lazy;
use std::path::{Path, PathBuf};
use std::sync... |
7d71804ecacd859a432ebff2af870032b7687a49b303707d221202e023304e00 | Rust | 4,415 | 96 | use dbt_telemetry::{ExecutionPhase, PhaseExecuted};
use super::{duration::format_duration_fixed_width, layout::right_align_static_action};
/// Get the phase action text for a given `ExecutionPhase` (lowercase, no padding)
pub fn get_phase_action(phase: ExecutionPhase) -> &'static str {
match phase {
Execu... |
18561bc854f3d17aa442172dcfe2f6b3e5a46f575ad24c5f6a4f66b719f3d839 | Rust | 4,425 | 172 | use std::{rc::Rc, sync::Arc};
use crate::{
types::{
function::{ArgSpec, FunctionType},
iterable::IterableType,
tuple::TupleType,
DynObject, Object, Type,
},
TypecheckingEventListener,
};
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct DictType {
... |
424060bd11d52979fa2e683d377f2aef9e7a56bc70c45dc196ce71d3815599e2 | Rust | 4,427 | 43 | /*
* 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... |
4e85d9e83e7f174de260413dad09de53be36f6d103a73fac49ab4ebb58bf4abe | Rust | 4,436 | 122 | //! Tests covering `OperationCtx` end-to-end:
//!
//! 1. The typed ctx serializes to the historical
//! `build_operation_context_btreemap` BTreeMap shape (14 base keys +
//! `config: DummyConfig` + per-namespace flatten).
//! 2. The `config` slot downcasts to `DummyConfig` after the serde
//! round-trip — this... |
e5bb49eabe418d0694b6751ce47df64fef30e9dc847d3efa6d1c72d5e1dba85e | Rust | 4,445 | 113 | 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::SnowflakeDescribeR... |
03bb43c67a71a1446f429d2b12babb4b78abe3a1deaec70786b3716922748413 | Rust | 4,457 | 48 | /*
* 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... |
45451f0d4bb26640aee74554f74f3d3ea1790d055cadfd404b63c2ab282a3a8f | Rust | 4,459 | 123 | use std::collections::BTreeMap;
use std::sync::Arc;
use dbt_adapter::Adapter;
use dbt_common::FsResult;
use dbt_common::io_args::{EvalArgs, Phases};
use dbt_common::io_utils::checkpoint_maybe_exit;
use dbt_dag::schedule::Schedule;
use dbt_freshness::freshness::{
FreshnessTimestamps, build_freshness_artifact, build... |
f180f6b3db2474af01080876762bc8768673680ae76d7f6e2f85bedef1814148 | Rust | 4,460 | 121 | use dbt_error::ErrorCode;
use crate::{
io_args::StaticAnalysisKind,
tracing::dbt_emit::{emit_error_log_message, emit_error_log_message_package_scoped},
};
pub enum StaticAnalysisDeprecationOrigin<'a> {
CliArg,
ProjectConfig,
NodeConfig { unique_id: &'a str },
}
#[inline]
pub fn normalize_static_a... |
7dbd68c4c1c01c4832b98b73882902fe4ff72edc1036c558695018d05913f99c | Rust | 4,468 | 123 | //! Isolated microbenchmark for the GC bias-corrected effective-length
//! convolution (`corrected_effective_length_full`), so it can be profiled and
//! A/B'd without the surrounding 130s quant run (where it's only ~5% of wall).
//!
//! Generates a realistic set of transcripts (human-cDNA-like length spread,
//! rando... |
bffd8360041fc97bddab6635941e4285c20ba7920742c2d55ff2cd774cc91aeb | Rust | 4,518 | 40 | /*
* 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... |
c3c07ae824eccba17e5446559aeaadbd6046a738b3ee5c386005cdb108bcf2cf | Rust | 4,523 | 167 | use std::borrow::Cow;
use std::collections::BTreeMap;
use std::sync::Arc;
use arrow_array::RecordBatch;
use arrow_schema::Schema;
use dbt_adapter_core::AdapterType;
use dbt_adbc::*;
use dbt_auth::AdapterConfig;
use dbt_common::AdapterResult;
use dbt_common::behavior_flags::Behavior;
use dbt_common::cancellation::Cance... |
991bbd9388614a7e4ee059b4c5efbdd80b1c1a5b29026df88fcaef2d63f26fa1 | Rust | 4,546 | 146 | use minijinja::listener::RenderingEventListener;
use minijinja::value::Object;
use minijinja::{State, Value};
use std::collections::BTreeMap;
use std::rc::Rc;
use std::sync::Arc;
/// Configuration used to create a BehaviorFlagRendered instance
///
/// Args:
/// name: the name of the behavior flag
/// default:... |
e8b055ea2039a22578ed6f6d1193912fd792273bae47fd9e27ba7d44f8d26a26 | Rust | 4,572 | 109 | use dbt_adapter_core::AdapterType;
use dbt_common::FsResult;
use dbt_common::path::DbtPath;
use dbt_jinja_utils::jinja_environment::JinjaEnv;
use dbt_jinja_utils::serde::into_typed_with_jinja;
use dbt_jinja_utils::utils::dependency_package_name_from_ctx;
use dbt_schemas::schemas::common::NodeDependsOn;
use dbt_schemas:... |
21d57160305f8ca0924b2a28aacf66b526575a163e5fd4ddd7b71ed4988ee3ff | Rust | 4,611 | 141 | use std::collections::BTreeMap;
use std::sync::Arc;
use dbt_adapter_core::AdapterType;
use dbt_jinja_utils::mock_object::MockJinjaObject;
use minijinja::Value;
use crate::macro_test_harness::{MacroTestHarness, default_mock_config};
#[test]
fn python_table_tmp_relation_type_is_allowed() {
let harness = MacroTestH... |
e2d43e5ea487dc849411d2ecd3f76e8458ff457431cf626dfacea15c8d3566a5 | Rust | 4,627 | 43 | /*
* 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... |
d2ae60556cb273eecf2cf283688f3acfb013190dcdabf65b87d9335df3dba551 | Rust | 4,628 | 119 | //! Trait for git host clients.
use std::path::Path;
use async_trait::async_trait;
use dbt_common::FsResult;
use super::{
DownloadOutcome, InstallOutcome, ParsedGitUrl, ResolveMethod, ResolveOutcome, is_commit,
};
/// Host-specific git package resolution and download.
///
/// Implementations should override the... |
c87f92b001701565ad57f106e365979f54f46fa0cda5fe6cc91c412812018f6a | Rust | 4,632 | 147 | use dbt_telemetry::{GenericOpExecuted, GenericOpItemProcessed};
use dbt_tracing::{SpanStatus, StatusCode};
use crate::tracing::formatters::layout::{right_align_action, right_align_static_action};
use super::{
color::{GREEN, RED, maybe_apply_color},
duration::format_duration_fixed_width,
};
pub fn capitalize_... |
6be2d6a8a49db8a7bb9e55fde64b40de50d6966205fa0e94c14c15cdf9c7f6fe | Rust | 4,683 | 132 | //! Live Snowflake regression for Ctrl+C-style cancellation of an in-flight
//! ADBC statement.
//!
//! This intentionally uses `TrackedStatement` and
//! `cancel_all_tracked_statements`, matching the adapter path used when a
//! dbt invocation receives Ctrl+C. This covers client cancellation while
//! `CALL SYSTEM$WAI... |
ede0c6d80f7d9eb5779a1766fa45603dcccd5676463eab221e7aaca86c3ff5a7 | Rust | 4,684 | 38 | /*
* 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... |
f6e0cb314ddbbc9a1c566764907ad8e348d3b20a360255985bbffd44d24ef6ba | Rust | 4,713 | 45 | /*
* 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... |
b7659b0059844f5bf623205cf68f50a9502d7f8220ed221d53c1836d3de92c04 | Rust | 4,715 | 146 | use crate::adapter::adapter_impl::{DEFAULT_BASE_BEHAVIOR_FLAGS, adapter_specific_behavior_flags};
use arrow::array::RecordBatch;
use dbt_adapter_core::AdapterType;
use dbt_adbc::*;
use dbt_common::AdapterResult;
use dbt_common::behavior_flags::Behavior;
use dbt_common::cancellation::CancellationToken;
use minijinja::S... |
d6ae699f8da31b7340a8e98b3c680ef9363e636c0ed45f4ce0ab3ca2d640af2d | Rust | 4,730 | 189 | use core::fmt;
use std::rc::Rc;
use std::sync::Arc;
use crate::table::TableRepr;
use crate::{MappedSequence, Tuple, TupleRepr};
use arrow_array::{Array, StringViewArray};
use minijinja::listener::RenderingEventListener;
use minijinja::value::{Enumerator, Object, ObjectRepr};
use minijinja::{State, Value};
#[derive(De... |
de34e10b46779a0b9e6d8d64a9f3cba8c8bd59095f73a1c0c0c868a990afb38e | Rust | 4,738 | 161 | pub mod init;
use crate::{AdapterConfig, Auth, AuthError, AuthWarningPrinter};
use dbt_adbc::{Backend, database};
pub struct DuckDbAuth {
backend: Backend,
#[allow(dead_code, reason = "unused until DuckDB auth has a warning to raise")]
pub warning_printer: Box<dyn AuthWarningPrinter>,
}
impl DuckDbAuth ... |
8df7de5ba717ef8b4bdcf6363899eb60c37c95f69399bdbd8077c4954bc91c15 | Rust | 4,760 | 127 | //! Generic epoch-append parquet infrastructure.
//!
//! All epoch tables share the same file-management pattern:
//! - Files named `v{VERSION}_{N}.parquet` in a directory
//! - Write: serialize rows via `serde_arrow`, compress with ZSTD
//! - Read: deserialize all rows from a file via `serde_arrow`
//! - Epochs: scan ... |
95404cf153b01895e69681449d3cdcd75598a86fefcc497ee61c85e84356a428 | Rust | 4,768 | 128 | //! Tests covering `CompileNodeCtx` end-to-end:
//!
//! 1. The typed ctx serializes to exactly the same key set today's
//! `build_compile_node_context_inner<T>` BTreeMap produces — 18 keys
//! including the underscore-decorated `TARGET_PACKAGE_NAME` /
//! `TARGET_UNIQUE_ID` / `__minijinja_current_path` /
//! ... |
3d8aa1a84542948ce0dbd8b40fcf41c4c472a882af929ff75ca2b69fec15a19b | Rust | 4,789 | 155 | //! Simple in-memory catalog providers used in tests and fallback scenarios.
use datafusion_catalog::{CatalogProvider, CatalogProviderList, SchemaProvider, TableProvider};
use datafusion_common::error::DataFusionError;
use dbt_frontend_common::error::InternalResult;
use dbt_frontend_common::ident::Identifier;
use scc:... |
73ccce8a2395260baff107bfc28ab24d7555f19112ffd309ee9613f770dfc488 | Rust | 4,795 | 166 | use std::fmt;
use std::ptr::addr_of_mut;
use serde::{Deserialize, Serialize};
use crate::machinery::Span;
use crate::utils::AutoEscape;
use crate::value::Value;
/// How should output be captured?
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
#[cfg_attr(feature = "unstable_machinery_serde", derive(serde::Serialize))]
... |
81afd0d35e926a36c7b111533005e83919bb9bfab81566353e928ad835cf5168 | Rust | 4,813 | 83 | //! Diagnostic: for read pairs the sketch leaves unmapped, show each mate's
//! accepted hits (tid, orientation, pos) and the merge_se_mappings outcome, to
//! see why merge_lists rejects a pair that aligns concordantly under SW
//! (orientation mismatch? fragment-length? shared tid not co-accepted?).
//! Usage: trace_... |
bee31c829e335ad7d8f9d60f4458c827828c06657d231b921e46689082eb5ec8 | Rust | 4,843 | 144 | use std::cell::RefCell;
use std::error::Error as _;
use std::ffi::c_char;
use std::ptr;
use minijinja::{Error, ErrorKind};
thread_local! {
pub static LAST_ERROR: RefCell<Option<Error>> = const { RefCell::new(None) };
}
/// Returns `true` if there is currently an error.
#[no_mangle]
pub extern "C" fn mj_err_is_se... |
c3074fa9e136ca27838cd0b39c5f4652b0f74ea735e0ffd8eca2649d34cd1500 | Rust | 4,844 | 116 | //! Interactive-table variant of the `snowflake_initialization_warehouse` component.
//!
//! Interactive tables need a different local-config rule from dynamic tables, so this module
//! forks only that half. Everything else — the component type, the `NONE`/`""` unset
//! normalization, the case-insensitive diff and th... |
eefb50f1d20999caf3f7b6474d08b6602b528095c2dcfc4aa56195016d048665 | Rust | 4,847 | 152 | use std::collections::BTreeSet;
use crate::types::Type;
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UnionType {
pub types: BTreeSet<Type>,
}
impl std::fmt::Debug for UnionType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
... |
310ae5afc3130c57f6165057338b633a5efd17b098c47256283570aec000b998 | Rust | 4,851 | 143 | //! Per-run resolution cache shared across git host clients.
use super::{GitUrlParts, ResolveMethod};
#[derive(Default)]
pub struct ResolveCache {
entries: scc::HashMap<String, (String, ResolveMethod)>,
}
impl ResolveCache {
pub fn new() -> Self {
Self::default()
}
}
/// Cache entries are scoped... |
3ec79c1dc06c86a489b9483440f19d0490481c721e214ef826bd900485e8bcc2 | Rust | 4,871 | 145 | use dbt_adapter::relation::RelationObject;
use dbt_adapter_core::AdapterType;
use dbt_schemas::dbt_types::RelationType;
use minijinja::Value;
use std::collections::BTreeMap;
use std::sync::Arc;
use crate::macro_test_harness::{MacroTestHarness, assert_executed_contains, default_mock_config};
#[test]
fn databricks_metr... |
b97ccfb15c6269d9367a9784c143d72240f8b76d21278d7620a61826311a5474 | Rust | 4,878 | 139 | use std::collections::HashMap;
use dbt_adapter_core::AdapterType;
use dbt_common::behavior_flags::{Behavior, BehaviorFlag};
use minijinja::Value;
use crate::macro_test_harness::MacroTestHarness;
const FLAG_NAME: &str = "enable_truthy_nulls_equals_macro";
const DISPATCHING_EQUALS: &str = r#"
{% macro equals(expr1, e... |
0c9adbb2d73ceae9fb998aa1670ea891ae409cd56e924f8dd22dc45497da6a7d | Rust | 4,880 | 151 | use std::fmt;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
use crate::error::{Error, ErrorKind};
use crate::listener::RenderingEventListener;
use crate::value::{Enumerator, Object, Value};
use crate::vm::state::State;
pub(crate) struct Loop {
pub len: Option<usize>... |
2e8b552f1a520129431472704a50c89d4c4881341aacd4502c1069e360ad8c3a | Rust | 4,881 | 53 | /*
* 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... |
750ef18074bea33644717cfa7e3d014aba8bdf9f491080a5043a72d843fa5612 | Rust | 4,899 | 114 | //! Embedded Jinja macros shipped with the classifier crate.
//!
//! These macros are registered into the project-wide `JinjaEnv` at startup
//! under the synthetic package name `dbt_classification`. They implement
//! the Snowflake-tag round-trip described in
//! `propagation_of_snowflake_tags.md`:
//!
//! - `dbt_cla... |
39d398521019ea726fc711389b66f948096ab7699df4841d652988bd5d10902a | Rust | 4,901 | 122 | use std::sync::Arc;
use std::{collections::BTreeMap, path::PathBuf};
pub use dbt_common::io_args::IoArgs;
use dbt_common::io_args::{EvalArgs, FsCommand, InternalPackageMode, Phases};
use dbt_common::warn_error_options::WarnErrorOptions;
use dbt_schemas::state::DbtState;
#[derive(Clone, Default)]
pub struct LoadArgs {... |
75abb573a7ac7510e52f3fb3cbb1f21256f482da8d99df0a1bb8d600280cbce1 | Rust | 4,925 | 113 | //! Module defines the input arguments required for resolution
use dbt_adapter_core::AdapterType;
use dbt_common::io_args::{IoArgs, MULTI_ADAPTER_ENV, StaticAnalysisKind, multi_adapter_enabled};
use dbt_common::{ErrorCode, FsResult, fs_err};
use dbt_common::{
io_args::{EvalArgs, FsCommand},
node_selector::{Ind... |
e220285541f508031dfe1833bcb20b6f0856d9628be509c0468da42a60ed6de5 | Rust | 4,928 | 159 | use std::collections::BTreeMap;
use dbt_adapter_core::AdapterType;
use minijinja::Value;
use crate::macro_test_harness::{MacroTestHarness, default_mock_config};
fn build_harness(replace_on: bool, insert_by_name: bool) -> MacroTestHarness {
let harness = MacroTestHarness::for_adapter(AdapterType::Databricks)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.