DB::Exception: Unknown expression identifier.. during Aspects version upgrade from v2.5.1 to v3.0.2

Hello,

I’m encountering a DB::Exception: Unknown expression identifier error during an Ulmo upgrade.

I upgraded Aspects from 2.5.1 to 3.0.2 and then ran tutor k8s launch. After following the upgrade steps documented here:
https://docs.openedx.org/projects/openedx-aspects/en/latest/technical_documentation/how-tos/02_upgrade.html

When executing the step:

tutor k8s do init -l aspects

the process fails with the same error. I’ve attached a screenshot of the error for reference.

Has anyone encountered this issue during the upgrade, or can you suggest how to resolve it?

ERROR creating sql materialized_view model `reporting`.`dim_most_recent_enrollment`  ERROR[0m in 0.09s]	3/11/2026, 3:34:58.286 PM

ERROR creating sql view model `reporting`.`fact_enrollments` .......... ERROR[0m in 0.07s]	3/11/2026, 3:34:58.331 PM

ERROR creating sql materialized_view model `reporting`.`dim_learner_most_recent_course_state`  ERROR[0m in 0.08s]	3/11/2026, 3:34:58.462 PM

ERROR creating sql materialized_view model `reporting`.`fact_video_segments`  ERROR[0m in 0.03s]	3/11/2026, 3:34:58.778 PM

DB::Exception: Unknown expression identifier `enrollment_status` in scope ranked_enrollments AS (SELECT emission_time, org, course_key, actor_id, enrollment_mode, enrollment_status, row_number() OVER (PARTITION BY org, course_key, actor_id ORDER BY emission_time DESC) AS rn FROM xapi.enrollment_events). Maybe you meant: ['enrollment_mode']. Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<char const*, String&, String, String, String>(int, FormatStringHelperImpl<std::type_identity<char const*>::type, std::type_identity<String&>::type, std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String>::type>, char const*&&, String&, String&&, String&&, String&&) @ 0x000000001761cc82
  4. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e857f
  5. DB::QueryAnalyzer::resolveExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool) @ 0x00000000175e57f4
  6. DB::QueryAnalyzer::resolveProjectionExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000001761da27
  7. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6ee
  8. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  9. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  10. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  11. DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x00000000175da038
  12. DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x00000000175d969c
  13. DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>) @ 0x0000000017644576
  14. DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) (.llvm.12293961885029361306) @ 0x00000000181afd0d
  15. DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x00000000181adc5c
  16. DB::InterpreterSelectQueryAnalyzer::getSampleBlock(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&) @ 0x00000000181b0161
  17. DB::InterpreterCreateQuery::getTablePropertiesAndNormalizeCreateQuery(DB::ASTCreateQuery&, DB::LoadingStrictnessLevel) const @ 0x00000000180d16c7
  18. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x00000000180d9f22
  19. DB::InterpreterCreateQuery::execute() @ 0x00000000180f0578
  20. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>) @ 0x00000000185809a0
  21. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x0000000018578c0b
  22. DB::TCPHandler::runImpl() @ 0x0000000019c62510
  23. DB::TCPHandler::run() @ 0x0000000019c84599
  24. Poco::Net::TCPServerConnection::start() @ 0x000000001f1b62c7
  25. Poco::Net::TCPServerDispatcher::run() @ 0x000000001f1b6759
  26. Poco::PooledThread::run() @ 0x000000001f17cdc7
  27. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001f17b1c1
  28. ? @ 0x0000000000094ac3
  29. ? @ 0x00000000001268d0
[0m10:04:59  
[0m10:04:59    Database Error in model fact_enrollments (models/enrollment/fact_enrollments.sql)






  DB::Exception: Identifier 'enrollments.enrollment_status' cannot be resolved from table with name enrollments. In scope SELECT enrollments.emission_time AS emission_time, enrollments.org AS org, enrollments.course_key AS course_key, courses.course_name AS course_name, courses.course_run AS course_run, enrollments.actor_id AS actor_id, enrollments.enrollment_mode AS enrollment_mode, enrollments.enrollment_status AS enrollment_status, users.username AS username, users.name AS name, users.email AS email FROM xapi.enrollment_events AS enrollments INNER JOIN event_sink.dim_course_names AS courses ON enrollments.course_key = courses.course_key LEFT JOIN reporting.dim_user_pii AS users ON ((actor_id LIKE 'mailto:%') AND (substring(actor_id, 8) = users.email)) OR (actor_id = toString(users.external_user_id)). Maybe you meant: ['enrollments.enrollment_mode']. Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<String const&, String&, String, String>(int, FormatStringHelperImpl<std::type_identity<String const&>::type, std::type_identity<String&>::type, std::type_identity<String>::type, std::type_identity<String>::type>, String const&, String&, String&&, String&&) @ 0x000000001785fff0
  4. DB::IdentifierResolver::tryResolveIdentifierFromStorage(DB::Identifier const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::AnalysisTableExpressionData const&, DB::IdentifierResolveScope&, unsigned long, bool) @ 0x000000001785f81a
  5. DB::IdentifierResolver::tryResolveIdentifierFromTableExpression(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000178602bc
  6. DB::IdentifierResolver::tryResolveIdentifierFromJoinTreeNode(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000017860d7a
  7. DB::IdentifierResolver::tryResolveIdentifierFromJoin(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000017861282
  8. DB::IdentifierResolver::tryResolveIdentifierFromJoinTreeNode(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000017860da6
  9. DB::IdentifierResolver::tryResolveIdentifierFromJoin(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000017861282
  10. DB::IdentifierResolver::tryResolveIdentifierFromJoinTreeNode(DB::IdentifierLookup const&, std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000017860da6
  11. DB::IdentifierResolver::tryResolveIdentifierFromJoinTree(DB::IdentifierLookup const&, DB::IdentifierResolveScope&) @ 0x000000001786584d
  12. DB::QueryAnalyzer::tryResolveIdentifier(DB::IdentifierLookup const&, DB::IdentifierResolveScope&, DB::IdentifierResolveContext) @ 0x00000000175f9053
  13. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e6981
  14. DB::QueryAnalyzer::resolveExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool) @ 0x00000000175e57f4
  15. DB::QueryAnalyzer::resolveProjectionExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000001761da27
  16. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6ee
  17. DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x00000000175da038
  18. DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x00000000175d969c
  19. DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>) @ 0x0000000017644576
  20. DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) (.llvm.12293961885029361306) @ 0x00000000181afd0d
  21. DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x00000000181adc5c
  22. DB::InterpreterSelectQueryAnalyzer::getSampleBlock(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&) @ 0x00000000181b0161
  23. DB::InterpreterCreateQuery::getTablePropertiesAndNormalizeCreateQuery(DB::ASTCreateQuery&, DB::LoadingStrictnessLevel) const @ 0x00000000180d16c7
  24. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x00000000180d9f22
  25. DB::InterpreterCreateQuery::execute() @ 0x00000000180f0578
  26. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>) @ 0x00000000185809a0
  27. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x0000000018578c0b
  28. DB::TCPHandler::runImpl() @ 0x0000000019c62510
  29. DB::TCPHandler::run() @ 0x0000000019c84599
  30. Poco::Net::TCPServerConnection::start() @ 0x000000001f1b62c7
  31. Poco::Net::TCPServerDispatcher::run() @ 0x000000001f1b6759
  compiled code at target/run/aspects/models/enrollment/fact_enrollments.sql
[0m10:04:59  
[0m10:04:59    Database Error in model dim_learner_most_recent_course_state (models/grading/dim_learner_most_recent_course_state.sql)




  DB::Exception: Unknown expression identifier `approving_state` in scope ranked_status AS (SELECT org, course_key, actor_id, approving_state, emission_time, row_number() OVER (PARTITION BY org, course_key, actor_id ORDER BY emission_time DESC) AS rn FROM xapi.grading_events WHERE NOT empty(approving_state)). Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<char const*, String&, String, String, String>(int, FormatStringHelperImpl<std::type_identity<char const*>::type, std::type_identity<String&>::type, std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String>::type>, char const*&&, String&, String&&, String&&, String&&) @ 0x000000001761cc82
  4. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e857f
  5. DB::QueryAnalyzer::resolveExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool) @ 0x00000000175e57f4
  6. DB::QueryAnalyzer::resolveProjectionExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000001761da27
  7. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6ee
  8. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  9. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  10. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  11. DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x00000000175da038
  12. DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x00000000175d969c
  13. DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>) @ 0x0000000017644576
  14. DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) (.llvm.12293961885029361306) @ 0x00000000181afd0d
  15. DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x00000000181adc5c
  16. DB::InterpreterSelectQueryAnalyzer::getSampleBlock(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&) @ 0x00000000181b0161
  17. DB::InterpreterCreateQuery::getTablePropertiesAndNormalizeCreateQuery(DB::ASTCreateQuery&, DB::LoadingStrictnessLevel) const @ 0x00000000180d16c7
  18. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x00000000180d9f22
  19. DB::InterpreterCreateQuery::execute() @ 0x00000000180f0578
  20. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>) @ 0x00000000185809a0
  21. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x0000000018578c0b
  22. DB::TCPHandler::runImpl() @ 0x0000000019c62510
  23. DB::TCPHandler::run() @ 0x0000000019c84599
  24. Poco::Net::TCPServerConnection::start() @ 0x000000001f1b62c7
  25. Poco::Net::TCPServerDispatcher::run() @ 0x000000001f1b6759
  26. Poco::PooledThread::run() @ 0x000000001f17cdc7
  27. Poco::ThreadImpl::runnableEntry(void*) @ 0x000000001f17b1c1
  28. ? @ 0x0000000000094ac3
  29. ? @ 0x00000000001268d0
[0m10:04:59  
[0m10:04:59    Database Error in model fact_video_segments (models/video/fact_video_segments.sql)



  DB::Exception: Unknown expression identifier `emission_time_long` in scope data AS (SELECT event_id, org, course_key, actor_id, emission_time_long, video_position, object_id, video_duration, if(verb_id = 'https://w3id.org/xapi/video/verbs/played', 'start', 'end') AS verb FROM xapi.video_playback_events WHERE verb_id != 'http://adlnet.gov/expapi/verbs/initialized'). Maybe you meant: ['emission_time']. Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<char const*, String&, String, String, String>(int, FormatStringHelperImpl<std::type_identity<char const*>::type, std::type_identity<String&>::type, std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String>::type>, char const*&&, String&, String&&, String&&, String&&) @ 0x000000001761cc82
  4. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e857f
  5. DB::QueryAnalyzer::resolveExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool) @ 0x00000000175e57f4
  6. DB::QueryAnalyzer::resolveProjectionExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000001761da27
  7. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6ee
  8. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  9. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  10. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  11. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  12. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  13. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  14. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  15. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  16. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  17. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  18. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  19. DB::QueryAnalyzer::resolveJoin(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x00000000176205fa
  20. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761e878
  21. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  22. DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x00000000175e635a
  23. DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x000000001761edd8
  24. DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x00000000175dc6a4
  25. DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x00000000175da038
  26. DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x00000000175d969c
  27. DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>) @ 0x0000000017644576
  28. DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) (.llvm.12293961885029361306) @ 0x00000000181afd0d
  29. DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x00000000181adc5c
  30. DB::InterpreterSelectQueryAnalyzer::getSampleBlock(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&) @ 0x00000000181b0161
  31. DB::InterpreterCreateQuery::getTablePropertiesAndNormalizeCreateQuery(DB::ASTCreateQuery&, DB::LoadingStrictnessLevel) const @ 0x00000000180d16c7
[0m10:04:59  

Hi @Sliver_Horizon - it’s best practice to include error logs in a code block, not a screenshot, so they’re easier to read and can be searched. Could you update your post to have that?

Tagging @Sara_Burns for help with the issue.

Hi @Silvandar_Beardvale - so sorry about that, I should have added this to the upgrade documentation. You should be able to run this and then try the init again:

tutor k8s do dbt -c 'run --full-refresh --select video_playback_events+ dim_learner_last_response+' --only_changed False

If you still run into issues please let me know

Thanks for you reply, I ran this command but it got failed with *“Database Error in model“

here is full log,

Making dbt script executable...
Running dbt, only_changed: False command: run --full-refresh --select video_playback_events+ dim_learner_last_response+
fatal: cannot change to 'aspects-dbt/': No such file or directory
fatal: cannot change to 'aspects-dbt/': No such file or directory
Installing aspects-dbt
git clone -b v6.1.0 https://github.com/openedx/aspects-dbt
Cloning into 'aspects-dbt'...
Note: switching to 'a437d09497507b7eac17d9a7b18a0f8a93ecff93'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Installing dbt python requirements
Requirement already satisfied: dbt-clickhouse==1.9.4 in /usr/local/lib/python3.12/site-packages (from -r ./requirements.txt (line 1)) (1.9.4)
Requirement already satisfied: dbt-core~=1.9.0 in /usr/local/lib/python3.12/site-packages (from -r ./requirements.txt (line 2)) (1.9.10)
Requirement already satisfied: shandy-sqlfmt==0.26.0 in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (0.26.0)
Requirement already satisfied: dbt-coverage in /usr/local/lib/python3.12/site-packages (from -r ./requirements.txt (line 4)) (0.4.1)
Requirement already satisfied: clickhouse-cityhash in /usr/local/lib/python3.12/site-packages (from -r ./requirements.txt (line 5)) (1.0.2.5)
Requirement already satisfied: dbt-adapters<1.17,>=1.16 in /usr/local/lib/python3.12/site-packages (from dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (1.16.7)
Requirement already satisfied: clickhouse-connect>=0.6.22 in /usr/local/lib/python3.12/site-packages (from dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (0.6.23)
Requirement already satisfied: clickhouse-driver>=0.2.6 in /usr/local/lib/python3.12/site-packages (from dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (0.2.10)
Requirement already satisfied: setuptools>=0.69 in /usr/local/lib/python3.12/site-packages (from dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (82.0.0)
Requirement already satisfied: click<9.0,>=8.0 in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt==0.26.0->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (8.3.1)
Requirement already satisfied: jinja2<4.0,>=3.0 in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt==0.26.0->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (3.1.6)
Requirement already satisfied: platformdirs<5.0,>=2.4 in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt==0.26.0->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (4.6.0)
Requirement already satisfied: tqdm<5.0,>=4.0 in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt==0.26.0->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (4.67.3)
Requirement already satisfied: black in /usr/local/lib/python3.12/site-packages (from shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (25.12.0)
Requirement already satisfied: agate<1.10,>=1.7.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.9.1)
Requirement already satisfied: mashumaro<3.15,>=3.9 in /usr/local/lib/python3.12/site-packages (from mashumaro[msgpack]<3.15,>=3.9->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (3.14)
Requirement already satisfied: networkx<4.0,>=2.3 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (3.6.1)
Requirement already satisfied: protobuf<7.0,>=6.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (6.33.5)
Requirement already satisfied: requests<3.0.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.32.5)
Requirement already satisfied: snowplow-tracker<2.0,>=1.0.2 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.1.0)
Requirement already satisfied: pathspec<0.13,>=0.9 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.12.1)
Requirement already satisfied: sqlparse<0.6.0,>=0.5.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.5.5)
Requirement already satisfied: dbt-extractor<=0.6,>=0.5.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.6.0)
Requirement already satisfied: dbt-semantic-interfaces<0.8,>=0.7.4 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.7.5)
Requirement already satisfied: dbt-common<2.0,>=1.13.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.37.2)
Requirement already satisfied: packaging>20.9 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (26.0)
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2025.2)
Requirement already satisfied: pyyaml>=6.0 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (6.0.3)
Requirement already satisfied: daff>=1.3.46 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.4.2)
Requirement already satisfied: typing-extensions>=4.4 in /usr/local/lib/python3.12/site-packages (from dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (4.15.0)
Requirement already satisfied: typer<1,>=0.4 in /usr/local/lib/python3.12/site-packages (from dbt-coverage->-r ./requirements.txt (line 4)) (0.23.0)
Requirement already satisfied: Babel>=2.0 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.18.0)
Requirement already satisfied: isodate>=0.5.4 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.7.2)
Requirement already satisfied: leather>=0.3.2 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.4.1)
Requirement already satisfied: parsedatetime!=2.5,>=2.1 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.6)
Requirement already satisfied: python-slugify>=1.2.1 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (8.0.4)
Requirement already satisfied: pytimeparse>=1.1.5 in /usr/local/lib/python3.12/site-packages (from agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.1.8)
Requirement already satisfied: certifi in /usr/local/lib/python3.12/site-packages (from clickhouse-connect>=0.6.22->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (2026.1.4)
Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.12/site-packages (from clickhouse-connect>=0.6.22->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (2.6.3)
Requirement already satisfied: zstandard in /usr/local/lib/python3.12/site-packages (from clickhouse-connect>=0.6.22->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (0.25.0)
Requirement already satisfied: lz4 in /usr/local/lib/python3.12/site-packages (from clickhouse-connect>=0.6.22->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (4.4.5)
Requirement already satisfied: tzlocal in /usr/local/lib/python3.12/site-packages (from clickhouse-driver>=0.2.6->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (5.3.1)
Requirement already satisfied: dbt-protos<2.0,>=1.0.291 in /usr/local/lib/python3.12/site-packages (from dbt-adapters<1.17,>=1.16->dbt-clickhouse==1.9.4->-r ./requirements.txt (line 1)) (1.0.431)
Requirement already satisfied: colorama<0.5,>=0.3.9 in /usr/local/lib/python3.12/site-packages (from dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.4.6)
Requirement already satisfied: deepdiff<9.0,>=7.0 in /usr/local/lib/python3.12/site-packages (from dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (8.6.1)
Requirement already satisfied: jsonschema<5.0,>=4.0 in /usr/local/lib/python3.12/site-packages (from dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (4.26.0)
Requirement already satisfied: python-dateutil<3.0,>=2.0 in /usr/local/lib/python3.12/site-packages (from dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.9.0.post0)
Requirement already satisfied: importlib-metadata<9,>=6.0 in /usr/local/lib/python3.12/site-packages (from dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (8.7.1)
Requirement already satisfied: more-itertools<11.0,>=8.0 in /usr/local/lib/python3.12/site-packages (from dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (10.8.0)
Requirement already satisfied: pydantic<3,>=1.10 in /usr/local/lib/python3.12/site-packages (from dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.12.5)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/site-packages (from jinja2<4.0,>=3.0->shandy-sqlfmt==0.26.0->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (3.0.3)
Requirement already satisfied: msgpack>=0.5.6 in /usr/local/lib/python3.12/site-packages (from mashumaro[msgpack]<3.15,>=3.9->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.1.2)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.12/site-packages (from requests<3.0.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (3.4.4)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.12/site-packages (from requests<3.0.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (3.11)
Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.12/site-packages (from typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (1.5.4)
Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.12/site-packages (from typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (14.3.2)
Requirement already satisfied: annotated-doc>=0.0.2 in /usr/local/lib/python3.12/site-packages (from typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (0.0.4)
Requirement already satisfied: mypy-extensions>=0.4.3 in /usr/local/lib/python3.12/site-packages (from black->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (1.1.0)
Requirement already satisfied: pytokens>=0.3.0 in /usr/local/lib/python3.12/site-packages (from black->shandy-sqlfmt[jinjafmt]==0.26.0->-r ./requirements.txt (line 3)) (0.4.1)
Requirement already satisfied: orderly-set<6,>=5.4.1 in /usr/local/lib/python3.12/site-packages (from deepdiff<9.0,>=7.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (5.5.0)
Requirement already satisfied: zipp>=3.20 in /usr/local/lib/python3.12/site-packages (from importlib-metadata<9,>=6.0->dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (3.23.0)
Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.12/site-packages (from jsonschema<5.0,>=4.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (25.4.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.12/site-packages (from jsonschema<5.0,>=4.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2025.9.1)
Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.12/site-packages (from jsonschema<5.0,>=4.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.37.0)
Requirement already satisfied: rpds-py>=0.25.0 in /usr/local/lib/python3.12/site-packages (from jsonschema<5.0,>=4.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.30.0)
Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.12/site-packages (from pydantic<3,>=1.10->dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.7.0)
Requirement already satisfied: pydantic-core==2.41.5 in /usr/local/lib/python3.12/site-packages (from pydantic<3,>=1.10->dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (2.41.5)
Requirement already satisfied: typing-inspection>=0.4.2 in /usr/local/lib/python3.12/site-packages (from pydantic<3,>=1.10->dbt-semantic-interfaces<0.8,>=0.7.4->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (0.4.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.12/site-packages (from python-dateutil<3.0,>=2.0->dbt-common<2.0,>=1.13.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.17.0)
Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.12/site-packages (from python-slugify>=1.2.1->agate<1.10,>=1.7.0->dbt-core~=1.9.0->-r ./requirements.txt (line 2)) (1.3)
Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.12/site-packages (from rich>=10.11.0->typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (4.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.12/site-packages (from rich>=10.11.0->typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (2.19.2)
Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.12/site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1,>=0.4->dbt-coverage->-r ./requirements.txt (line 4)) (0.1.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: pip install --upgrade pip
Installing dbt dependencies
0m11:44:50  Running with dbt=1.9.10
0m11:44:50  Installing dbt-labs/codegen
0m11:44:50  Installed from version 0.13.1
0m11:44:50  Updated version available: 0.14.0
0m11:44:50  Installing dbt-labs/dbt_utils
0m11:44:50  Installed from version 1.3.0
0m11:44:50  Updated version available: 1.3.3
0m11:44:50  
0m11:44:50  Updates available for packages: ['dbt-labs/codegen', 'dbt-labs/dbt_utils']                 
Update your versions in packages.yml, then run dbt deps
Running run --full-refresh --select video_playback_events+ dim_learner_last_response+
Insert data script.
Loading: /app/aspects-dbt/state/manifest.json
0m11:44:52  Running with dbt=1.9.10
0m11:44:52  Registered adapter: clickhouse=1.9.4
0m11:44:52  Unable to do partial parsing because saved manifest not found. Starting full parse.
0m11:44:55  [33mWARNING0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
#NAME?
0m11:44:55  Performance info: /app/aspects-dbt/target/perf_info.json
Running command *without* state:modified+ this may take a long time.
0m11:44:57  Running with dbt=1.9.10
0m11:44:58  Registered adapter: clickhouse=1.9.4
0m11:44:58  [33mWARNING0m]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
#NAME?
0m11:44:58  Found 37 models, 16 data tests, 8 sources, 635 macros, 27 unit tests
0m11:44:58  
0m11:44:58  Concurrency: 2 threads (target='prod')
0m11:44:58  
0m11:44:59  1 of 7 START sql materialized_view model `reporting`.`dim_learner_last_response`  [RUN]
0m11:44:59  2 of 7 START sql materialized_view model `xapi`.`video_playback_events` ........ [RUN]
0m11:44:59  2 of 7 OK created sql materialized_view model `xapi`.`video_playback_events` ... [32mOK0m in 0.53s]
0m11:44:59  3 of 7 START sql materialized_view model `reporting`.`fact_video_segments` ..... [RUN]
0m11:44:59  3 of 7 OK created sql materialized_view model `reporting`.`fact_video_segments`  [32mOK0m in 0.27s]
0m11:44:59  4 of 7 START sql materialized_view model `reporting`.`fact_video_engagement` ... [RUN]
0m11:45:10  4 of 7 ERROR creating sql materialized_view model `reporting`.`fact_video_engagement`  [31mERROR0m in 10.34s]
0m11:45:10  1 of 7 ERROR creating sql materialized_view model `reporting`.`dim_learner_last_response`  [31mERROR0m in 11.17s]
0m11:45:10  5 of 7 SKIP relation reporting.dim_problem_coursewide_avg ...................... [33mSKIP0m]
0m11:45:10  6 of 7 SKIP relation reporting.dim_subsection_problem_results .................. [33mSKIP0m]
0m11:45:10  7 of 7 SKIP relation reporting.dim_subsection_performance ...................... [33mSKIP0m]
0m11:45:10  
0m11:45:10  Finished running 7 materialized view models in 0 hours 0 minutes and 11.57 seconds (11.57s).
0m11:45:10  
0m11:45:10  31mCompleted with 2 errors, 0 partial successes, and 0 warnings:0m
0m11:45:10  
0m11:45:10    Database Error in model fact_video_engagement (models/video/fact_video_engagement.sql)
  Code: 394.
  DB::Exception: Query was cancelled. Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<>(int, FormatStringHelperImpl<>) @ 0x000000000ca505ab
  4. DB::QueryStatus::throwQueryWasCancelled() const @ 0x000000001823de6f
  5. DB::QueryStatus::throwProperExceptionIfNeeded(unsigned long const&, unsigned long const&) @ 0x000000001823dd6c
  6. DB::PipelineExecutor::finalizeExecution() @ 0x0000000019d223e3
  7. DB::PipelineExecutor::execute(unsigned long, bool) @ 0x0000000019d21efd
  8. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::CompletedPipelineExecutor::execute()::$_0>(DB::CompletedPipelineExecutor::execute()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000019d20abb
  9. ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x00000000136f6812
  10. void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x00000000136fe2da
  11. ? @ 0x0000000000094ac3
  12. ? @ 0x00000000001268d0
  compiled code at target/run/aspects/models/video/fact_video_engagement.sql
0m11:45:10  
0m11:45:10    Database Error in model dim_learner_last_response (models/problems/dim_learner_last_response.sql)
  Code: 394.
  DB::Exception: Query was cancelled. Stack trace:

  0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001359985f
  1. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000ca41a4e
  2. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000ca41500
  3. DB::Exception::Exception<>(int, FormatStringHelperImpl<>) @ 0x000000000ca505ab
  4. DB::QueryStatus::throwQueryWasCancelled() const @ 0x000000001823de6f
  5. DB::QueryStatus::throwProperExceptionIfNeeded(unsigned long const&, unsigned long const&) @ 0x000000001823dd6c
  6. DB::PipelineExecutor::finalizeExecution() @ 0x0000000019d223e3
  7. DB::PipelineExecutor::execute(unsigned long, bool) @ 0x0000000019d21efd
  8. void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::CompletedPipelineExecutor::execute()::$_0>(DB::CompletedPipelineExecutor::execute()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000019d20abb
  9. ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x00000000136f6812
  10. void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x00000000136fe2da
  11. ? @ 0x0000000000094ac3
  12. ? @ 0x00000000001268d0
  compiled code at target/run/aspects/models/problems/dim_learner_last_response.sql
0m11:45:10  
0m11:45:10  Done. PASS=2 WARN=0 ERROR=2 SKIP=3 TOTAL=7

I’m not sure why these are giving you issues if you were already on v2.5.1 (a lot of these models changed going from 2.4 to 2.5), but this should hopefully resolve everything:

tutor [local/dev/k8s] do dbt --only_changed False -c 'run --full-refresh --select dim_problem_responses+ fact_video_segments+ dim_course_blocks+ fact_navigation_completion+ fact_pageview_engagement+ problem_events+ dim_learner_last_response+ dim_problem_results+ dim_subsection_problem_results+ fact_problem_engagement+ dim_problem_coursewide_avg+ dim_subsection_performance+'

Thank you so much for your reply, I have successfully ran command you have shared.

Aspect job got completed successfully but now some issue appear in lms job run, could you please confirm is this something related to aspects?

WARNINGS:
embargo.GlobalRestrictedCountry.country: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
" HINT: ForeignKey(unique=True) is usually better served by a OneToOneField."
Importing JSON data from file /tmp/erb_config.json
Traceback (most recent call last):
File “/openedx/venv/lib/python3.11/site-packages/django/apps/registry.py”, line 158, in get_app_config
return self.app_configs[app_label]
~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: ‘event_routing_backends’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/openedx/edx-platform/./manage.py”, line 99, in
execute_from_command_line([sys.argv[0]] + django_args)
File “/openedx/venv/lib/python3.11/site-packages/django/core/management/init.py”, line 442, in execute_from_command_line
utility.execute()
File “/openedx/venv/lib/python3.11/site-packages/django/core/management/init.py”, line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/openedx/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 416, in run_from_argv
self.execute(*args, **cmd_options)
File “/openedx/venv/lib/python3.11/site-packages/django/core/management/base.py”, line 460, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/openedx/venv/lib/python3.11/site-packages/config_models/management/commands/populate_model.py”, line 76, in handle
created_entries = deserialize_json(data, options[‘username’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/openedx/venv/lib/python3.11/site-packages/config_models/utils.py”, line 61, in deserialize_json
serializer_class = get_serializer_class(apps.get_model(parsed_json[“model”]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/openedx/venv/lib/python3.11/site-packages/django/apps/registry.py”, line 208, in get_model
app_config = self.get_app_config(app_label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/openedx/venv/lib/python3.11/site-packages/django/apps/registry.py”, line 165, in get_app_config
raise LookupError(message)
LookupError: No installed app with label ‘event_routing_backends’.

That usually means that the openedx image needs to be rebuilt. Try

tutor config save
tutor images build openedx --no-cache

It’ll take a while to run unfortunately, but should solve the problem.