generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dli): add example flink sql job
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
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,63 @@ | ||
apiVersion: dli.flexibleengine.upbound.io/v1beta1 | ||
kind: FlinksqlJob | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: dli/v1beta1/flinksqljob | ||
labels: | ||
testing.upbound.io/example-name: example_dli_flinksqljob | ||
name: example-dli-flinksqljob | ||
spec: | ||
forProvider: | ||
name: example-dli-flinksqljob | ||
type: flink_sql_job | ||
sql: | | ||
CREATE SOURCE STREAM car_infos ( | ||
car_id STRING, | ||
car_owner STRING, | ||
car_brand STRING, | ||
car_price INT | ||
) | ||
WITH ( | ||
type = "dis", | ||
region = "eu-west-0", | ||
channel = "example-dis-stream-input", | ||
partition_count = "1", | ||
encode = "csv", | ||
field_delimiter = "," | ||
); | ||
CREATE SINK STREAM audi_cheaper_than_30w ( | ||
car_id STRING, | ||
car_owner STRING, | ||
car_brand STRING, | ||
car_price INT | ||
) | ||
WITH ( | ||
type = "dis", | ||
region = "eu-west-0", | ||
channel = "example-dis-stream-output", | ||
partition_key = "car_owner", | ||
encode = "csv", | ||
field_delimiter = "," | ||
); | ||
INSERT INTO audi_cheaper_than_30w | ||
SELECT * | ||
FROM car_infos | ||
WHERE car_brand = "audia4" and car_price < 30; | ||
CREATE SINK STREAM car_info_data ( | ||
car_id STRING, | ||
car_owner STRING, | ||
car_brand STRING, | ||
car_price INT | ||
) | ||
WITH ( | ||
type ="dis", | ||
region = "eu-west-0", | ||
channel = "example-dis-stream-input", | ||
partition_key = "car_owner", | ||
encode = "csv", | ||
field_delimiter = "," | ||
); | ||
INSERT INTO car_info_data | ||
SELECT "1", "lilei", "bmw320i", 28; | ||
INSERT INTO car_info_data | ||
SELECT "2", "hanmeimei", "audia4", 27; |
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,27 @@ | ||
apiVersion: dis.flexibleengine.upbound.io/v1beta1 | ||
kind: Stream | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: dis/v1beta1/stream | ||
labels: | ||
testing.upbound.io/example-name: example_dis_streaminput | ||
name: example-dis-streaminput | ||
spec: | ||
forProvider: | ||
name: example-dis-stream-input | ||
partitionCount: 1 | ||
|
||
--- | ||
|
||
apiVersion: dis.flexibleengine.upbound.io/v1beta1 | ||
kind: Stream | ||
metadata: | ||
annotations: | ||
meta.upbound.io/example-id: dis/v1beta1/stream | ||
labels: | ||
testing.upbound.io/example-name: example_dis_streamoutput | ||
name: example-dis-streamoutput | ||
spec: | ||
forProvider: | ||
name: example-dis-stream-output | ||
partitionCount: 1 |