khangtruong113 opened a new issue, #71457: URL: https://github.com/apache/doris/issues/71457
### Background ETL models need to require values for some columns while allowing NULL in others. The adapter creates tables from SELECT statements, so the physical schema depends on how Doris types the query output. ### Current behavior Declaring a column's data type yields a CAST in the model projection. Doris 4.1.5 derives nullability during CTAS. A not_null YAML constraint alone does not reach the target DDL. ### Expected behavior A model can declare a required id, a nullable note and another column with inferred nullability. A failed initial load or rebuild must not publish an empty replacement. ### Proposed design Read dbt's column not_null constraint and config.meta.doris.nullable: true. For opted-in models, create an explicitly typed table, load it and publish it after successful insertion. Use a zero-row, session-local CTAS when the model leaves types or nullability to Doris. ### Impact Applies to initial table and incremental builds and full refreshes. Existing incremental tables can adopt the new schema on full refresh. Models without the new declarations continue to use CTAS. Related to #65993. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
