SmiMi opened a new issue, #45873:
URL: https://github.com/apache/doris/issues/45873

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   - dbt-core version: 1.5.10 (Latest: 1.7.9 - Update available!)
   - dbt-doris plugin version: 0.3.4
   - Doris version: doris-2.1.5-rc02
   - Python version: 3.9.13
   
   ### What's Wrong?
   
   During my modeling process with dbt-doris, I found that the SQL statements 
in the post-hook are not taking effect. I tried to add comments to the table 
fields in the post-hook, but after the model execution is complete, the field 
comments are still empty.
   
   Below are my YML and SQL files:
   
   ```
    ---
   version: 2
   models:
   - name: "dim_test_after"
     description: "aaaa"
     config:
       contract:
         enforced: false
     columns:
     - name: "customer_code"
       description: ""
       data_type: "varchar"
       constraints: []
     - name: "id"
       description: ""
       data_type: "varchar"
       constraints: []
     - name: "customer_name"
       description: ""
       data_type: "varchar"
       constraints: []
    ```
   
   ```
   {{config(
   post_hook=[
   "ALTER TABLE dim_test_after
   MODIFY COLUMN customer_code  COMMENT 'customer code',
   MODIFY COLUMN id  COMMENT 'customer id',
   MODIFY COLUMN customer_name  COMMENT 'customer name'"],
   materialized='table',
   )
   }}
   with middle_steo as (
   select 1)
   select customer_code, id,customer_name from dim_customer
   ```
   
   Below is the log of the successful execution. 
   
   ```
   {
     "exitCode": 0,
     "output": "10:10:51  Running with dbt=1.5.10
   10:10:52  Registered adapter: doris=0.3.4
   10:10:52  Found 8 models, 0 tests, 0 snapshots, 0 analyses, 328 macros, 0 
operations, 0 seed files, 19 sources, 0 exposures, 0 metrics, 0 groups
   10:10:52  
   10:10:52  Concurrency: 4 threads (target='fat')
   10:10:52  
   10:10:52  1 of 1 START sql table model bigdata.dim_test_after 
............................ [RUN]
   10:10:52  1 of 1 OK created sql table model bigdata.dim_test_after 
....................... [351 rows affected in 0.65s]
   10:10:53  
   10:10:53  Finished running 1 table model in 0 hours 0 minutes and 0.83 
seconds (0.83s).
   10:10:53  
   10:10:53  Completed successfully
   10:10:53  
   10:10:53  Done. PASS=1 WARN=0 ERROR=0 SKIP=0 TOTAL=1
   Command exited with return code 0"
   }
   ```
   
   But even though the execution was successful, the ALTER TABLE statement did 
not take effect.
   
   ### What You Expected?
   
   I expect the post-hook to take effect.
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to