Skip to content

Commit

Permalink
debugging WIP
Browse files Browse the repository at this point in the history
fixed breaking null comlumn names

also cleaned up a bunch of comments

fix length bug on load

removed debugging code

add changelog and remove unnecesary code from debugging

added changelog
  • Loading branch information
emmyoop committed Feb 24, 2022
1 parent b473370 commit 15ace14
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## dbt-core 1.0.1 (TBD)
## dbt-core 1.0.4 (TBD)

- Patch spark specific bug to allow docs to continue working. ([#236](https://github.com/dbt-labs/dbt-docs/issues/236), [#247](https://github.com/dbt-labs/dbt-docs/pull/247))

## dbt-core 1.0.1 (January 03, 2022)

- Fix bug with missing exposure details. ([docs#228](https://github.com/dbt-labs/dbt-docs/pull/228))

Expand Down
7 changes: 7 additions & 0 deletions src/app/components/model_tree/model_tree_line.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ angular
// start = everything up to end

var name = scope.item.name;

// name *should* always exists but there is a bug where some items don't make it into the catalog.
// This allows docs to continue to work while the bug gets fixed outside dbt-docs. Once the bug
// is fixed, we will just never fall into this if.
if (!name) {
return
}
var end_chars = 15;
var end = _.last(name, end_chars).join('');
var start = _.initial(name, end.length).join('');
Expand Down
9 changes: 7 additions & 2 deletions src/app/services/project_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,13 @@ angular
objects.push({key: i, value: val});
} else if (search_keys[i] === 'object') {
for (var column_name in obj[i]) {
if (obj[i][column_name]["name"].toLowerCase().indexOf(val.toLowerCase()) != -1) {
objects.push({key: i, value: val});
// there a spark bug where columns are missign from the catalog. That needs to be fixed
// outside of docs but this if != null check will allow docs to continue to function now
// and also when the bug is fixed.
if (obj[i][column_name]["name"] != null) {
if (obj[i][column_name]["name"].toLowerCase().indexOf(val.toLowerCase()) != -1) {
objects.push({key: i, value: val});
}
}
}
} else if (search_keys[i] === 'array') {
Expand Down

0 comments on commit 15ace14

Please sign in to comment.