http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Can-I-get-the-filename-as-a-column-tp39096p39099.html
I've written [FLINK-19903][1].
I just read [FLIP-107][2] and [FLINK-15869][3] and I need to ask....
So assuming that FLIP-107 / FLINK-15869 is implemented and Filesystem SQL connector modified to expose metadata (including path, and possible other stuff) , then to use it I would need to write:
CREATE TABLE table1(
`text` VARCHAR, -- each CSV row is just a single text column
) WITH (
'connector' = 'filesystem`,
'path' = 'file://Users/ecerulm/mycsvfiles/',
'format' = 'csv',
'include.metadata' = 'path,size' -- tell filesystem connector to add 2 extra columns called `flink-filesystem-metadata.path` and `flink-filesystem-metadata.size`
);
Is that right?