当前位置:   article > 正文

python使用doris教程_pydoris

pydoris

1. 使用insert or update语句操作数据时,出现如下所示的提示信息

        原因:登陆的帐号对表没有写入和删除的权限,
        解决方法:申请对表的操作权限 

  1. get_data_frame executing SQL : (pymysql.err.OperationalError) (1142, "errCode = 2, detailMessage = LOAD command denied to user 'default_cluster:dbuser'@'192.2.232.100' for table 'default_cluster:dws: dws_bi__log'")
  2. [SQL: insert into dws.dws_bi__log ();]
  3. (Background on this error at: https://sqlalche.me/e/14/e3q8)

2 出现 unsupported operand type(s) for *: 'float' and 'decimal.Decimal'
原因:wac_gapj是小数,而且小数位数有6位,而bdt_qty_sepecial_customer是一个整数的变量,因此不能直接相乘,而是要转化成相同精度的小数,才能计算,修改如下:
bdt_amount_sepecial_customer=Decimal(bdt_qty_sepecial_customer)*(wac_gap)
bdt_amount_control=(wac_gap)*Decimal(bdt_qty_control)
gain_amount=(wac_gap)*Decimal(gain_qty)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/973141
推荐阅读
相关标签
  

闽ICP备14008679号