Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] singlestore__real_relation_type can be set to an unexpected type #32

Open
rchui opened this issue Jan 31, 2025 · 0 comments
Open

Comments

@rchui
Copy link

rchui commented Jan 31, 2025

The macro rename.sql can assign singlestore__real_relation_type to a value that is not "view" or "table". This occurred during a --full-refresh operation and it cleared up after running a second full refresh. There appears to be some intermediate state or race condition that causes the macro to evaluate the relation type incorrectly.

Log:

19:06:05.046153 [debug] [Thread-1 (]: SQL status: OK. Rows affected: 0 in 0.073 seconds
19:06:05.050541 [debug] [Thread-1 (]: SingleStore adapter: Error running SQL: macro rename_relation
19:06:05.052504 [debug] [Thread-1 (]: On model.singlestore.{model}: ROLLBACK
19:06:05.127625 [debug] [Thread-1 (]: On model.singlestore.{model}: Close
19:06:05.138647 [debug] [Thread-1 (]: Runtime Error in model {model} (models/common/{model}.sql)
  Compilation Error in macro rename_relation (macros/relations/rename.sql)
    singlestore__real_relation_type for {schema} returned "" - must be "view" or "table"
    
    > in macro statement (macros/etc/statement.sql)
    > called by macro singlestore__rename_relation (macros/common.sql)
    > called by macro rename_relation (macros/relations/rename.sql)
    > called by macro rename_relation (macros/relations/rename.sql)
19:06:05.142561 [error] [Thread-1 (]: 2 of 3 ERROR creating sql incremental model {schema}_{model}  [ERROR in 19.47s]
19:06:05.144119 [debug] [Thread-1 (]: Finished running node model.singlestore.{model}
19:06:05.146599 [debug] [Thread-4 (]: Marking all children of 'model.singlestore.{model}' to be skipped because of status 'error'.  Reason: Runtime Error in model {model} (models/common/{model}.sql)
  Compilation Error in macro rename_relation (macros/relations/rename.sql)
    singlestore__real_relation_type for {schema}_{model}__dbt_tmp returned "" - must be "view" or "table"
    
    > in macro statement (macros/etc/statement.sql)
    > called by macro singlestore__rename_relation (macros/common.sql)
    > called by macro rename_relation (macros/relations/rename.sql)
    > called by macro rename_relation (macros/relations/rename.sql).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant