Skip to content

Commit

Permalink
clean up scripts, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
novakov-alexey committed Aug 25, 2024
1 parent 30d45d8 commit 087d32d
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ metals.sbt
.scala-build
.ammonite/*
*.jar
*checkpoint
*checkpoint
sink-table
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ We suggest to remove the official `flink-scala` and `flink-streaming-scala` depe

## Examples

There is a wide range of [code examples](https://github.com/flink-extended/flink-scala-api/tree/master/examples) to introduce you to flink-scala-api, both using Scala scripts and multimodule applications. These examples include:
There is a wide range of [code examples](https://github.com/flink-extended/flink-scala-api/tree/master/modules/examples) to introduce you to flink-scala-api, both using Scala scripts and multimodule applications. These examples include:

- Flink jobs built using Scala 3 with Ammonite and Scala CLI;
- A complete application for fraud detection;
- Examples using datastream and table APIs;
- Simple jobs developed interactively via Jupyter notebooks;
- Word count reading texts from a web socket;
- Examples using Datastream and Table APIs;
- Simple job developed interactively via Jupyter notebooks;
- Word count reading text from a web socket;
- Example usage of DataGen connector and Kafka sink;
- And more;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import $ivy.`io.findify::flink-scala-api:1.15-2`
import $ivy.`org.flinkextended::flink-scala-api:1.18.1_1.1.6`

import $ivy.`org.apache.flink:flink-clients_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-clients:1.18.1`

// import $ivy.`org.apache.flink:flink-streaming-java_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-streaming-scala_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-streaming-scala_2.12:1.18.1`

import $ivy.`org.apache.flink:flink-table-api-java:1.14.6`
import $ivy.`org.apache.flink:flink-table-api-java-bridge_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-table-runtime_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-table-planner_2.12:1.14.6`
import $ivy.`org.apache.flink:flink-table-api-java:1.18.1`
import $ivy.`org.apache.flink:flink-table-api-java-bridge:1.18.1`
import $ivy.`org.apache.flink:flink-table-runtime:1.18.1`
import $ivy.`org.apache.flink:flink-table-planner_2.12:1.18.1`

import org.apache.flink.table.api._
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment
import org.apache.flink.connector.datagen.table.DataGenConnectorOptions

import io.findify.flink.api._
import io.findify.flinkadt.api._
import org.apache.flinkx.api._
import org.apache.flinkx.api.serializers._

import java.lang.{Long => JLong}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,10 @@ import org.apache.flink.api.serializers._

import _root_.java.lang.{Long => JLong}

val env = StreamExecutionEnvironment.getExecutionEnvironment
val tEnv = StreamTableEnvironment.create(env.getJavaEnv)
val env = StreamExecutionEnvironment.getExecutionEnvironment
val tEnv = StreamTableEnvironment.create(env.getJavaEnv)
val settings = EnvironmentSettings.newInstance().inStreamingMode().build()
val table = TableEnvironment.create(settings)


// table.createTemporaryTable(
// "SourceTable",
// TableDescriptor
// .forConnector("datagen")
// .schema(
// Schema.newBuilder
// .column("BookId", DataTypes.INT())
// .build
// )
// .option(DataGenConnectorOptions.ROWS_PER_SECOND, new JLong(1))
// .build
// )
val table = TableEnvironment.create(settings)

val tableDescriptor = TableDescriptor
.forConnector("faker")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using dep "org.flinkextended::flink-scala-api:1.17.1_1.1.0"
//> using dep "org.apache.flink:flink-clients:1.17.1"
//> using dep "org.flinkextended::flink-scala-api:1.18.1_1.1.6"
//> using dep "org.apache.flink:flink-clients:1.18.1"

import org.apache.flinkx.api.*
import org.apache.flinkx.api.serializers.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//> using dep "org.flinkextended::flink-scala-api:1.17.2_1.1.2"
//> using dep "org.apache.flink:flink-clients:1.17.1"
//> using dep "org.apache.flink:flink-csv:1.17.1"
//> using dep "org.apache.flink:flink-connector-files:1.17.1"
//> using dep "org.apache.flink:flink-table-runtime:1.17.1"
//> using dep "org.apache.flink:flink-table-planner-loader:1.17.1"
//> using dep "org.flinkextended::flink-scala-api:1.18.1_1.1.6"
//> using dep "org.apache.flink:flink-clients:1.18.1"
//> using dep "org.apache.flink:flink-csv:1.18.1"
//> using dep "org.apache.flink:flink-connector-files:1.18.1"
//> using dep "org.apache.flink:flink-table-runtime:1.18.1"
//> using dep "org.apache.flink:flink-table-planner-loader:1.18.1"

import org.apache.flink.table.api._
import org.apache.flink.connector.datagen.table.DataGenConnectorOptions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//> using dep "org.flinkextended::flink-scala-api:1.17.2_1.1.2"
//> using dep "org.apache.flink:flink-clients:1.17.1"
//> using dep "org.apache.flink:flink-csv:1.17.1"
//> using dep "org.apache.flink:flink-connector-files:1.17.1"
//> using dep "org.apache.flink:flink-connector-kafka:1.17.1"
//> using dep "org.apache.flink:flink-table-runtime:1.17.1"
//> using dep "org.apache.flink:flink-table-planner-loader:1.17.1"
//> using dep "org.flinkextended::flink-scala-api:1.18.1_1.1.6"
//> using dep "org.apache.flink:flink-clients:1.18.1"
//> using dep "org.apache.flink:flink-csv:1.18.1"
//> using dep "org.apache.flink:flink-connector-files:1.18.1"
//> using dep "org.apache.flink:flink-connector-kafka:3.0.2-1.18"
//> using dep "org.apache.flink:flink-table-runtime:1.18.1"
//> using dep "org.apache.flink:flink-table-planner-loader:1.18.1"

import org.apache.flink.table.api._
import org.apache.flink.connector.datagen.table.DataGenConnectorOptions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//> using dep "org.flinkextended::flink-scala-api:1.17.2_1.1.2"
//> using dep "org.apache.flink:flink-clients:1.17.1"
//> using dep "org.apache.flink:flink-csv:1.17.1"
//> using dep "org.apache.flink:flink-connector-files:1.17.1"
//> using dep "org.apache.flink:flink-connector-kafka:1.17.1"
//> using dep "org.flinkextended::flink-scala-api:1.18.1_1.1.6"
//> using dep "org.apache.flink:flink-clients:1.18.1"
//> using dep "org.apache.flink:flink-csv:1.18.1"
//> using dep "org.apache.flink:flink-connector-files:1.18.1"
//> using dep "org.apache.flink:flink-connector-kafka:3.0.2-1.18"

import org.apache.flinkx.api.*
import org.apache.flinkx.api.serializers.*
Expand Down
File renamed without changes.

0 comments on commit 087d32d

Please sign in to comment.