-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] LocalFile sink support multiple table #5931
[Feature] LocalFile sink support multiple table #5931
Conversation
7705063
to
1447249
Compare
path = "/tmp/hive/warehouse/${table_name}" | ||
file_format_type = "parquet" | ||
sink_columns = ["name","age"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multi-table and single-table are the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple table is same with single table, but it can change the path by inject the table name from catalogTable(Although single table can also do this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update For multiple table
to For extract source metadata
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For extract source metadata
LGTM, I changed the doc.
...l/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/local/sink/LocalFileSink.java
Show resolved
Hide resolved
...ain/java/org/apache/seatunnel/connectors/seatunnel/file/local/sink/LocalFileSinkFactory.java
Outdated
Show resolved
Hide resolved
ed4cd91
to
94c288d
Compare
94c288d
to
8004274
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
validateSingleChoice(option); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Hisoka-X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix we have some options which have the same key but different excepted values, which will be set under different condition.
e.g. compress_code
in file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense to me.
public class LocalFileSink | ||
implements SeaTunnelSink< | ||
SeaTunnelRow, FileSinkState, FileCommitInfo, FileAggregatedCommitInfo>, | ||
SupportMultiTableSink { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like there is some fragmentation. LocalFileSink
is not based onBaseFileSink
, but other file-related connectors are based on BaseFileSink
. Do we have plans to unify all file-related connectors? Can you create an issue? It is best to mark BaseFileSink
as deprecated in the code and link to the issue. cc @TyrantLucifer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it may cause a lot of file changes if we want to make all file connector can support MultipleTable
in one PR, since all file connectors doesn't use the new Factory API.So this pr only modify LocalFileSink, after we make all File connector support MultipleTable, then we can consider add a new common interface BaseMultipleTableFileSink
(I am not clear if we need to add this class).
Create #5970 to describe this.
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.