Hi Mike, I do not see any issues with your code. With a sample csv file like this a,1.0 b,2.0 c,3.0
it produces the expected result +----------------------+ | some_value | +----------------------+ | 3 | +----------------------+ 1 row in set Process finished with exit code 0 -- I do not use Windows, so I am not 100% sure what is the correct way to specify the file path there, however, some observations: - You are using a forward slash notation, I assume you are running in WSL or using cygwin or something like that? Notice that in that notation an additional forward slash is missing 'file:///foo/bar' - Omitting the schema works with the local filesystem by default. On *nix systems this works fine 'connector.path' = '/home/alex/tmp/test.csv' . Maybe you could just try a standard windows backward slash notation instead. - That said, when a non-existent file is specified, the job fails immediately, so I would actually expect that behavior if the issue was indeed with the file path. Which version of Flink are you running? Best, Alexander Fedulov On Wed, Jul 6, 2022 at 10:39 PM <pod...@gmx.com> wrote: > If I'm reading Flink manul correctly (and this is not simple - no > examples), this code should read CSV file: > > > *package flinkTest2;* > > > *import org.apache.flink.table.api.EnvironmentSettings; import > org.apache.flink.table.api.TableEnvironment;* > > *public class flinkTest2 {* > > * public static void main(String[] args) throws Exception {* > > > > > > * EnvironmentSettings settings = EnvironmentSettings > .newInstance() //.inStreamingMode() .inBatchMode() > .build();* > * final TableEnvironment tEnv = TableEnvironment.create(settings);* > > > > > > * tEnv.executeSql("CREATE TABLE test_table (column_name1 STRING, > column_name2 DOUBLE) WITH ('connector.type' = 'filesystem', > 'connector.path' = 'file://C/temp/test4.txt', 'format.type' = 'csv')"); > tEnv.sqlQuery("SELECT COUNT(*) AS some_value FROM test_table") > .execute() .print();* > > * } }* > > Job is running and running and running... > I think Flink is not able to open file. Does not matter what is here: > 'connector.path' = 'file://C/temp/test4.txt' Flink does not display any > error or something. 'connector.path' = 'file:blah/blah/blah' could be fine > for flink as well. > > Anyone could help me with that? > Thanks > Mike > >