-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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][Connector] New SeaTunnel API Connectors #1946 Add Druid Source&Sink #2651
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Druid | ||
|
||
> Druid sink connector | ||
|
||
## Description | ||
|
||
Write data to Apache Druid. | ||
|
||
|
||
## Options | ||
|
||
| name | type | required | default value | | ||
| ----------------------- | -------- | -------- | ------------- | | ||
| coordinator_url | `String` | yes | - | | ||
| datasource | `String` | yes | - | | ||
| columns | `List<String>` | yes | - | | ||
| timestamp_column | `String` | no | timestamp | | ||
| timestamp_format | `String` | no | auto | | ||
| timestamp_missing_value | `String` | no | - | | ||
|
||
### coordinator_url [`String`] | ||
|
||
The URL of Coordinator service in Apache Druid. | ||
|
||
### datasource [`String`] | ||
|
||
The DataSource name in Apache Druid. | ||
|
||
### columns [`List<String>`] | ||
|
||
These columns that you want to write of Druid. | ||
|
||
### timestamp_column [`String`] | ||
|
||
The timestamp column name in Apache Druid, the default value is `timestamp`. | ||
|
||
### timestamp_format [`String`] | ||
|
||
The timestamp format in Apache Druid, the default value is `auto`, it could be: | ||
|
||
- `iso` | ||
- ISO8601 with 'T' separator, like "2000-01-01T01:02:03.456" | ||
|
||
- `posix` | ||
- seconds since epoch | ||
|
||
- `millis` | ||
- milliseconds since epoch | ||
|
||
- `micro` | ||
- microseconds since epoch | ||
|
||
- `nano` | ||
- nanoseconds since epoch | ||
|
||
- `auto` | ||
- automatically detects ISO (either 'T' or space separator) or millis format | ||
|
||
- any [Joda DateTimeFormat](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html) string | ||
|
||
### timestamp_missing_value [`String`] | ||
|
||
The timestamp missing value in Apache Druid, which is used for input records that have a null or missing timestamp. The value of `timestamp_missing_value` should be in ISO 8601 format, for example `"2022-02-02T02:02:02.222"`. | ||
|
||
## Example | ||
|
||
### Simple | ||
|
||
```hocon | ||
DruidSink { | ||
coordinator_url = "http://localhost:8081/" | ||
datasource = "wikipedia" | ||
columns = ["flags","page"] | ||
} | ||
``` | ||
|
||
### Specified timestamp column and format | ||
|
||
```hocon | ||
DruidSink { | ||
coordinator_url = "http://localhost:8081/" | ||
datasource = "wikipedia" | ||
timestamp_column = "timestamp" | ||
timestamp_format = "auto" | ||
columns = ["flags","page"] | ||
} | ||
``` | ||
|
||
### Specified timestamp column, format and missing value | ||
|
||
```hocon | ||
DruidSink { | ||
coordinator_url = "http://localhost:8081/" | ||
datasource = "wikipedia" | ||
timestamp_column = "timestamp" | ||
timestamp_format = "auto" | ||
timestamp_missing_value = "2022-02-02T02:02:02.222" | ||
columns = ["flags","page"] | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Druid | ||
|
||
> Druid source connector | ||
|
||
## Description | ||
|
||
Read data from Apache Druid. | ||
|
||
## Options | ||
|
||
| name | type | required | default value | | ||
| ---------- | -------------- | -------- | ------------- | | ||
| url | `String` | yes | - | | ||
| datasource | `String` | yes | - | | ||
| start_date | `String` | no | - | | ||
| end_date | `String` | no | - | | ||
| columns | `List<String>` | no | `*` | | ||
|
||
### url [`String`] | ||
|
||
The URL of JDBC of Apache Druid. | ||
|
||
### datasource [`String`] | ||
|
||
The DataSource name in Apache Druid. | ||
|
||
### start_date [`String`] | ||
|
||
The start date of DataSource, for example, `'2016-06-27'`, `'2016-06-27 00:00:00'`, etc. | ||
|
||
### end_date [`String`] | ||
|
||
The end date of DataSource, for example, `'2016-06-28'`, `'2016-06-28 00:00:00'`, etc. | ||
|
||
### columns [`List<String>`] | ||
|
||
These columns that you want to write of DataSource. | ||
|
||
### common options [string] | ||
|
||
Source Plugin common parameters, refer to [Source Plugin](common-options.mdx) for details | ||
|
||
|
||
## Example | ||
|
||
```hocon | ||
DruidSource { | ||
url = "jdbc:avatica:remote:url=http://localhost:8082/druid/v2/sql/avatica/" | ||
datasource = "wikipedia" | ||
start_date = "2016-06-27 00:00:00" | ||
end_date = "2016-06-28 00:00:00" | ||
columns = ["flags","page"] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.