does anyone have a working example of Flink SQL wr...
# troubleshooting
r
does anyone have a working example of Flink SQL writing to a Delta table on MinIO? I can't for the life of me figure out the S3 config.
d
I don’t think Flink SQL supports writing to Delta table out of the box.
I think you need to use the DataStream API
Something like
Copy code
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.table.data.RowData;
import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
import org.apache.flink.table.types.logical.RowType;
import org.apache.flink.connector.delta.sink.DeltaSink;

DataStream<YourDataType> yourDataStream = ...; 

// convert DataStream to DataStream[RowData] if needed
DataStream<RowData> rowDataStream = yourDataStream.map(new MapFunction<YourDataType, RowData>() {
    @Override
    public RowData map(YourDataType value) throws Exception {
        // Implement conversion logic
    }
}, InternalTypeInfo.of(RowType.of(...))); // define the schema using RowType

// assuming you have a DeltaSink setup
DeltaSink<RowData> deltaSink = DeltaSink.forRowData(
    new Path("s3a://your-bucket/path/to/delta/table"),
    new Configuration() // pass the Flink configuration here, which includes S3 configs
);

rowDataStream.sinkTo(deltaSink);
r