André Midea Jasiskis
07/11/2023, 1:00 PM// Caused by: org.apache.flink.table.api.ValidationException: Invalid primary key
// 'PK_data.abc_event__id'. Column 'data.abc_event__id' does not
// exist.
The code snippet for the table declaration is the following:
private static final DataType abcTransferOutRequestRow =
DataTypes.ROW(
DataTypes.FIELD("abc_event__id", DataTypes.STRING()),
DataTypes.FIELD("abc_event__cancelled_at", DataTypes.TIMESTAMP_LTZ()),
DataTypes.FIELD("abc_event__created_at", DataTypes.TIMESTAMP_LTZ()),
DataTypes.FIELD("abc_event__e_2e_id", DataTypes.STRING()),
DataTypes.FIELD("abc_event__failed_at", DataTypes.TIMESTAMP_LTZ()),
DataTypes.FIELD("abc_event__initiation_type", DataTypes.STRING()),
DataTypes.FIELD("abc_event__message", DataTypes.STRING()),
DataTypes.FIELD("abc_event__transfer_in_id_to_refund", DataTypes.STRING()));
public static final Schema schema =
Schema.newBuilder()
.column("meta", EntitySnapshotPayload.metadataType)
.column("data", abcTransferOutRequestRow)
.primaryKey("data.abc_event__id")
.watermark("db__tx_instant", "db__tx_instant")
.build();
I tried to work around that by using a columnByExpression but I get an error related to the column not being physical.
Any ideas for work arounds or is that just a limitation of the table api?André Midea Jasiskis
07/11/2023, 2:30 PM.column("data.abc_event__id", STRING().notNull()))