79339926

Date: 2025-01-08 16:06:07
Score: 0.5
Natty:
Report link

In addition to mrdinklage's input, i was finally able to create prints from a parallel process, which used the 'print' connector (and adding the part below to my current pipeline):

        String createPrintTable = "CREATE TABLE kpisPrint (" +
            "    NAME STRING," +
        "    METRIC_RATIO FLOAT," +
            ") WITH (" +
            "    'connector' = 'print')";
    tableEnv.executeSql(createPrintTable);

    String sqlQueryPrint = "INSERT INTO kpisPrint " +
        "SELECT " +
        "    NAME, " +
        "    CAST(METRIC1 / METRIC2 AS FLOAT) AS METRIC_RATIO" +
        "FROM input;";
    
    // Execute the main pipeline in a StatementSet (with printing to logs)
            tableEnv.createStatementSet()
            .addInsertSql(params.get(INSERT_QUERY))
            .addInsertSql(sqlQueryPrint)
            .execute();

I am not sure this is considered best practice, and for sure not production ready, but worked for my local debugging purposes :)

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: By1