-
Notifications
You must be signed in to change notification settings - Fork 124
Description
Hello,
We are using test data. We have created the deployment and when copying the DAGs to Composer/Airflow we noticed that the DAG related to table t881 is giving an error:
Exception: BigQuery job failed. Final error was: {'reason': 'invalidQuery', 'location': 'query', 'message': 'Syntax error: Unexpected keyword ROLLUP at [30:157]'
We believe the issue is in the merge SQL query due to a column named "rollup" which is a SQL keyword. Below is the section of the query which mentions the column "rollup":
WHEN NOT MATCHED THEN
INSERT (mandt,rldnr,gcurr,class,typ,trcur,lccur,rccur,occur,quant,atqnt,tab,rcopy,shkz,glsip,vortrag,dldnr,xdldnr,curt1,curt2,curt3,v2post,lctyp,fix,post,rollup,depld,appl,subappl,komp,gzledger,exit,kldnr,logsys,valutyp,gcompress,splitmethd,date_det_poper,glflex,xleading,orient_ledger,avg_rollup,xcash_ledger,recordstamp)
VALUES
(mandt,rldnr,gcurr,class,typ,trcur,lccur,rccur,occur,quant,atqnt,tab,rcopy,shkz,glsip,vortrag,dldnr,xdldnr,curt1,curt2,curt3,v2post,lctyp,fix,post,rollup,depld,appl,subappl,komp,gzledger,exit,kldnr,logsys,valutyp,gcompress,splitmethd,date_det_poper,glflex,xleading,orient_ledger,avg_rollup,xcash_ledger,recordstamp)
WHEN MATCHED AND S.operation_flag='U' THEN
UPDATE SET
T.mandt=S.mandt,T.rldnr=S.rldnr,T.gcurr=S.gcurr,T.class=S.class,T.typ=S.typ,T.trcur=S.trcur,T.lccur=S.lccur,T.rccur=S.rccur,T.occur=S.occur,T.quant=S.quant,T.atqnt=S.atqnt,T.tab=S.tab,T.rcopy=S.rcopy,T.shkz=S.shkz,T.glsip=S.glsip,T.vortrag=S.vortrag,T.dldnr=S.dldnr,T.xdldnr=S.xdldnr,T.curt1=S.curt1,T.curt2=S.curt2,T.curt3=S.curt3,T.v2post=S.v2post,T.lctyp=S.lctyp,T.fix=S.fix,T.post=S.post,T.rollup=S.rollup,T.depld=S.depld,T.appl=S.appl,T.subappl=S.subappl,T.komp=S.komp,T.gzledger=S.gzledger,T.exit=S.exit,T.kldnr=S.kldnr,T.logsys=S.logsys,T.valutyp=S.valutyp,T.gcompress=S.gcompress,T.splitmethd=S.splitmethd,T.date_det_poper=S.date_det_poper,T.glflex=S.glflex,T.xleading=S.xleading,T.orient_ledger=S.orient_ledger,T.avg_rollup=S.avg_rollup,T.xcash_ledger=S.xcash_ledger,T.recordstamp=S.recordstamp
Maybe when the column "rollup" is mentioned it must be between brackets [rollup]?