Data processing using the DataStream API
It is crucial to have robust analytics in place to process real-time data. This is more important for domains that are data-driven. Flink enables you to do real-time analytics using its DataStream API. This streaming data processing API helps you cater to Internet of Things (IoT) applications and store, process, and analyze data in real time or near real time.
In the following sections, let's examine each of the elements related to the DataStream API:
- Execution environment
- Data sources
- Transformations
- Data sinks
- Connectors
Execution environment
To write a Flink program, you need an execution environment. You can use an existing environment or create a new environment.
Based on your requirements, Flink allows you to use an existing Flink environment, create a local environment, or create a remote environment.
Use thegetExecutionEnvironment()
command to accomplish different tasks based on your requirement:
- To execute on a local environment in an IDE, it starts...