Skip to content

Commit

Permalink
this should do it
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRobin committed Oct 23, 2024
1 parent de49e34 commit c060dd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/list_modified_downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ dbt_output=$(dbt ls $PROFILE \
--resource-type model \
--select state:modified+ \
--output json \
--output-keys alias schema config \
--output-keys config \
--state . \
--project-dir $PROJECT_DIR)

# For debugging
echo "Raw output:"
echo "$dbt_output"
#echo "Raw output:"
#echo "$dbt_output"

# Check for no output or error messages
if [ -z "$dbt_output" ] || echo "$dbt_output" | grep -q "No nodes selected"; then
Expand All @@ -35,7 +35,7 @@ echo "$dbt_output" | \
# Skip empty lines
[ -z "$line" ] && continue
# Extract and format each line
echo "$line" | jq -r '"\(.config.materialized) \(.config.schema) \(.alias)"'
echo "$line" | jq -r '"\(.config.materialized) \(.config.schema) \(.config.alias)"'
done | \
sort | \
while IFS= read -r line; do
Expand Down

0 comments on commit c060dd6

Please sign in to comment.