CREATE TABLE SQL

vmar
vmar Dataiku DSS Core Designer, Registered Posts: 9 ✭✭✭
edited July 16 in Using Dataiku

Hello,

I'm running that SQL script to create a table through a SQL recipe that creates 2 tables A and B

Create table A as select col1, col2, col3 FROM A1;
Create table B as select col4, col5, col6 FROM B1;

But I get the following error:

com.dataiku.dip.exceptions.ProcessDiedException: null failed (exit code: 3)
   at com.dataiku.dip.exceptions.ProcessDiedException.getExceptionOnProcessDeath(ProcessDiedException.java:59)
   at com.dataiku.dip.utils.DKUtils$SimpleExceptionExecCompletionHandler.handle(DKUtils.java:1062)
   at com.dataiku.dip.utils.DKUtils$ExecBuilder.exec(DKUtils.java:916)
   at com.dataiku.dip.dataflow.exec.sql.SQLScriptRecipeRunner.execPSQL(SQLScriptRecipeRunner.java:311)
   at com.dataiku.dip.dataflow.exec.sql.SQLScriptRecipeRunner.run(SQLScriptRecipeRunner.java:197)
   at com.dataiku.dip.dataflow.jobrunner.ActivityRunner$FlowRunnableThread.run(ActivityRunner.java:380)
[2020/09/17-15:54:56.188] [ActivityExecutor-34] [INFO] [dku.flow.activity] running compute_tl8q_cleaned_NP - activity is finished
[2020/09/17-15:54:56.216] [ActivityExecutor-34] [ERROR] [dku.flow.activity] running compute_tl8q_cleaned_NP - Activity failed
com.dataiku.dip.exceptions.ProcessDiedException: null failed (exit code: 3)
   at com.dataiku.dip.exceptions.ProcessDiedException.getExceptionOnProcessDeath(ProcessDiedException.java:59)
   at com.dataiku.dip.utils.DKUtils$SimpleExceptionExecCompletionHandler.handle(DKUtils.java:1062)
   at com.dataiku.dip.utils.DKUtils$ExecBuilder.exec(DKUtils.java:916)
   at com.dataiku.dip.dataflow.exec.sql.SQLScriptRecipeRunner.execPSQL(SQLScriptRecipeRunner.java:311)
   at com.dataiku.dip.dataflow.exec.sql.SQLScriptRecipeRunner.run(SQLScriptRecipeRunner.java:197)
   at com.dataiku.dip.dataflow.jobrunner.ActivityRunner$FlowRunnableThread.run(ActivityRunner.java:380)

What does that mean ? How can I correct this ?

Answers

  • dima_naboka
    dima_naboka Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 28 Dataiker
    edited July 17
    Hello,
    Looks like your log excerpt is missing the root cause for this error message. I was able to reproduce the issue though. It was observed on subsequent SQL script execution because “create table” statement couldn’t be executed successfully:
    [2020/09/18-17:33:17.752] [null-err-49] [INFO] [dku.utils]  - psql:/Users/user/Library/DataScienceStudio/dss_home/jobs/FILTER_FILLES/Build_sql_script_2020-09-18T14-33-17.010/compute_sql_script_NP/sql-recipe/script.sql:5: ERROR:  relation "filter_filles_custom_sql_script1" already exists
    [2020/09/18-17:33:17.752] [Thread-29] [INFO] [dku.utils]  - Done waiting for return value,  got 3
    [2020/09/18-17:33:17.756] [FRT-47-FlowRunnable] [INFO] [dku.flow.activity] - Run thread failed for activity compute_sql_script_NP
    com.dataiku.dip.exceptions.ProcessDiedException: null failed (exit code: 3)
    To workaround this problem you should introduce the logic to "drop table if exists” before “create table”, for example
    drop table if exists dku_tshirt.FILTER_FILLES_custom_sql_script1;
    create table dku_tshirt.FILTER_FILLES_custom_sql_script1 as select 1; 
    
    For more info on how to work with SQL scripts please refer to our doc.
Setup Info
    Tags
      Help me…