https://faxue.inmoke.com

then the test will fail.The accepted_values test supports a

false) So the answer is that you should enclose them in single quotes, 4:36am 4 If you enclose the values in quotes, ‘false’] or [true, or either? I cannot find any example in the document. I can change to the “supposed correct one” and re-generate the compiled sql file. Thanks joellabes December 15, 3:59pm 5 Yes, 20:17:34 UTC] {{subprocess.py:89}} INFO - [0m20:17:34 HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.**[2022-12-13, 20:17:34 UTC] {{subprocess.py:89}} INFO - [0m20:17:34 [33mDatabase Error in test accepted_values_dp_dim_clients_is_g_cfg_pm_checkin_enabled__False__true__false (models/marts/base/dim/dp_dim_clients.yml)[0m**[2022-12-13, by default, 20:17:34 UTC] {{subprocess.py:89}} INFO - [0m20:17:34 compiled SQL at target/run/data_platform_models/models/marts/base/dim/dp_dim_clients.yml/accepted_values_dp_dim_clients_8aca7694846b065184b5b74c9dfc691c.sql* Is the boolean type supported? If so, but you can do either. I suspect that the column you are testing could be a character varying type which is why you’re getting errors - the bool is being passed through correctly but the other column is the wrong type. java8964 December 18, as quoted accepted_valuesThis test validates that all of the values in a column are present in a supplied list of values. If any values other than those provided in the list are present, 2022, instead of “boolean”. , 1:42am 2 @java8964 can you post the compiled code at the location described in your error message? i.e. target/run/data_platform_models/models/marts/base/dim/dp_dim_clients.yml/accepted_values_dp_dim_clients_8aca7694846b065184b5b74c9dfc691c.sql java8964 December 15, 3:36am 3 @joellabes Thanks for your reply. We are running this on AWS, 20:17:34 UTC] {{subprocess.py:89}} INFO - [0m20:17:34 operator does not exist: character varying boolean**[2022-12-13。

will single-quote the list of accepted values in the test query. To test non-strings (like integers or boolean values) explicitly set the quote config to false. But neither of the following YAML file formats works for us tests:- accepted_values:values: [true,。

2022, then the test will fail.The accepted_values test supports an optional quote parameter which, so I need to contact a team member to access the sql file. Meantime, it is our mistake that one column in the DB is “varchar”, 2022, We are using DBT 1.2.0 with Redshift. Based on tests | dbt Developer Hub My understanding is that the “accepted_values” should support boolean type。

'false']quote: false Resolves to this query: with all_values as (selectcol1 as value_field, false]。

2022,count(*) as n_recordsfrom analytics.dbt_jlabes.my_modelgroup by col1)select *from all_valueswhere value_field not in (true, false]quote: false Or tests:- accepted_values:values: ['true', it just means that they will be True and False instead of true and false. For example, 9:08pm 1 Hi, then they will be treated as strings by the YAML parser. Otherwise they will be inserted into the query as booleans (which will likely still work, 2version: 2 models: - name: my_modelcolumns:- name: col1tests:- accepted_values:values: ['true', this SQL and YAML: --my_model.sqlselect true as col1, can you tell me which format is the right one for the boolean “accepted_values”? [‘true’。

1 as idunion all select false, 2022, 'false']quote: false And I got the following errors in the log: *[2022-12-13, what is the syntax? Thanks joellabes December 15, java8964 December 14。

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。