Skip to content

Commit e117381

Browse files
venkaa28claude
authored andcommitted
fix(dbt-index): stop populating column_index from YAML definitions & rename --use-index to --write-index (#9187)
* fix(dbt-index): stop populating column_index from YAML definitions column_index in node_columns was set from enumerate() during manifest ingestion, but YAML column ordering is arbitrary. Now only catalog data (from the actual warehouse) sets column_index. Also ensures catalog ingestion updates column_index on conflict and carries it forward across manifest-only parquet rewrites. Closes #9094 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * refactor: rename --use-index to --write-index with backward-compat alias Renames the CLI flag from --use-index to --write-index to better reflect its purpose (writing the parquet index). The old --use-index flag is preserved as a hidden alias for backward compatibility. Also renames the internal field from use_index to write_index across all crates. Additionally, declared-only columns (YAML without inferred counterpart) no longer get a column_index in the compile/build path, consistent with the column_index fix in the prior commit. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix(dbt-tasks): rename use_index -> write_index in analyzeable/mod.rs Missed reference from the --use-index to --write-index rename. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> * fix(dbt-main): rename remaining use_index -> write_index in dbt_lib.rs Two missed references at lines 146 and 1035. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> GitOrigin-RevId: 2fbb8cb3a54f37891db10fef0aa6733d9c76440d
1 parent 184b682 commit e117381

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/dbt-clap-core/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,8 +1424,8 @@ pub struct CommonArgs {
14241424
pub write_catalog: bool,
14251425

14261426
/// Write a parquet index alongside JSON artifacts for fast querying
1427-
#[arg(global = true, long, default_value_t=false, action = ArgAction::SetTrue, env = "DBT_USE_INDEX", value_parser = BoolishValueParser::new())]
1428-
pub use_index: bool,
1427+
#[arg(global = true, long = "write-index", alias = "use-index", default_value_t=false, action = ArgAction::SetTrue, env = "DBT_USE_INDEX", value_parser = BoolishValueParser::new())]
1428+
pub write_index: bool,
14291429

14301430
/// Directory for the index output (default: <target>/index/)
14311431
#[arg(global = true, long, env = "DBT_INDEX_DIR")]
@@ -1957,7 +1957,7 @@ impl CommonArgs {
19571957
self.write_json
19581958
},
19591959
write_catalog: self.write_catalog,
1960-
use_index: self.use_index,
1960+
write_index: self.write_index,
19611961
index_dir: self.index_dir.clone(),
19621962
fail_fast: self.fail_fast,
19631963
target_path: self.target_path.clone(),

crates/dbt-common/src/io_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ pub struct EvalArgs {
443443
/// Whether to skip running post hook operations.
444444
pub skip_post_hooks: bool,
445445
/// Write parquet index alongside JSON artifacts
446-
pub use_index: bool,
446+
pub write_index: bool,
447447
/// Directory for the parquet index output (default: <target>/index/)
448448
pub index_dir: Option<PathBuf>,
449449
/// Whether to skip creating generic tests

0 commit comments

Comments
 (0)