Quite possibly a stupid question but: I’m trying t...
# troubleshooting
s
Quite possibly a stupid question but: I’m trying to do
TableEnvironment.executeSql
but I want to get some configuration from a
wasbs://
file. The file itself is at max some kBs large, but the only way I found how to do it I end up with a FileSource: i.e.
Copy code
FileSource<String> source =
    FileSource.forRecordStreamFormat(
      new TextLineInputFormat("UTF-8"), new Path(...)
      .build();
. Can I somehow get the contents as a plain
String
instead? Running flink 1.16.1 at the moment, but if need be I can upgrade.
Answering myself, this seems to work:
Copy code
Path sqlPath = new Path(...);
    FileSystem fs = sqlPath.getFileSystem();
    FSDataInputStream inputStream = fs.open(sqlPath);
    InputStreamReader reader = new InputStreamReader(inputStream);
    String script = new BufferedReader(reader).lines().parallel().collect(Collectors.joining("\n"));