Closed ian-lewis-d closed 1 year ago
https://github.com/data-mie/dbt-profiler/blob/5c7002eaa3a8947756c223422b147b02a516bd90/update-relation-profile.sh#L14
Current: PROFILE=$(echo "$RUN_OPERATION_OUTPUT" | sed -n '/{% docs/,$p')
PROFILE=$(echo "$RUN_OPERATION_OUTPUT" | sed -n '/{% docs/,$p')
Suggested replacement:
PROFILE=$(echo "$RUN_OPERATION_OUTPUT" | awk '/{%.docs.*%}$/{flag=1} flag; /{%.enddocs.%}/{flag=0}')
@ian-lewis-d Thanks so much for this! I never liked the hacky sed I came up with, this works much better :) Merged in #73
https://github.com/data-mie/dbt-profiler/blob/5c7002eaa3a8947756c223422b147b02a516bd90/update-relation-profile.sh#L14
Current:
PROFILE=$(echo "$RUN_OPERATION_OUTPUT" | sed -n '/{% docs/,$p')
Suggested replacement:
PROFILE=$(echo "$RUN_OPERATION_OUTPUT" | awk '/{%.docs.*%}$/{flag=1} flag; /{%.enddocs.%}/{flag=0}')