datus-flink-plugin
A skill-only Datus plugin for creating and operating Apache Flink jobs. It bundles three skills across local validation, SQL packaging, and operation:
| Skill | Use it for |
|---|---|
flink-local-dev |
Running a Flink SQL job on the current machine, in an in-process MiniCluster, to validate its logic before it goes anywhere |
flink-sql |
Packaging a validated SQL script for Application Mode: build a runner JAR on Flink 1.x or use the built-in SqlDriver without jarURI on Flink 2.x |
flink-k8s-operator |
Building, deploying, and operating the job on the Apache Flink Kubernetes Operator |
The plugin intentionally declares no datus flink CLI and no Flink profiles.
flink-local-dev drives the Flink SQL Client in the local shell; flink-sql
selects and verifies the version-specific SQL application entry point;
flink-k8s-operator builds JVM or PyFlink projects, prepares Operator custom
resources, and delegates every Kubernetes workload operation to the separately
installed datus k8s plugin.
Each skill is a single SKILL.md — Datus discovers the skill file only, so a
skill directory cannot ship an assets/ or references/ subdirectory. Every
template the skills hand to a project (Operator manifests, Dockerfiles, the SQL
overlays, the local runner script) is inlined in the skill file under a
### <filename> heading, and the test suite extracts those blocks to check them.
Install
Install and configure the Kubernetes plugin first — it is needed for the deployment stage, not for local validation:
datus plugin install src:./datus-k8s-plugin
Then install this plugin:
datus plugin install src:./datus-flink-plugin
All three skills appear in the Datus skill catalogue. Invoke flink-local-dev
when writing or debugging a Flink SQL job, flink-sql when packaging it for
production, and flink-k8s-operator when creating, upgrading, suspending,
resuming, snapshotting, or diagnosing a FlinkDeployment or FlinkSessionJob.
Local validation, then production
The intended path for a Flink SQL job:
flink-local-dev— run the script in a MiniCluster inside one JVM. No Docker, no Kubernetes, no shared cluster. Sources may be real development endpoints; every sink is shadowed withprint,blackhole, or a localfile://table, so the run cannot write to a real system. Judge the output rows, changelog kinds, and counts against what the query should produce.flink-sql— choose the Application Mode entry point, build and test a runner JAR for Flink 1.x or select the built-inSqlDriverfor Flink 2.x, then verify the SQL and dependencies in the final image.flink-k8s-operator— deliver the settled image, render the FlinkDeployment, and apply it throughdatus k8s.
The production artifact (sql/job.sql) is byte-identical in both stages;
everything local lives in a separate, never-shipped overlay:
deploy/flink/<name>/
├── sql/job.sql # the artifact — unchanged between stages
├── local/ # flink-local-dev overlay (git-ignore credentials)
│ ├── local-session.sql # pins execution.target=local, table.dml-sync=true
│ ├── local-sources.sql # bounded, read-only dev source shadows
│ ├── local-sinks.sql # print / blackhole / file:// sink shadows
│ └── run-local-sql.sh # preflight + guards + SQL Client invocation
└── flinkdeployment.yaml # flink-k8s-operator output
run-local-sql.sh fails closed: it refuses to run when the session overlay does
not pin the local execution target and synchronous DML, when an INSERT target
has no local shadow, when a sink connector or path is not local, or when an
overlay carrying a credential is tracked by git.
Local validation needs a Flink distribution on the machine (FLINK_HOME) whose
minor version matches the production spec.flinkVersion, and a JDK that release
supports. It does not need Docker or cluster access.
Runtime boundary
- Flink Operator installation, CRDs, cluster RBAC, and webhooks are managed by the Kubernetes administrator.
- Flink workload reads and writes use
datus k8sand inherit its namespace allowlist and confirmation policy. - A local run never writes to a production sink, consumer group, CDC slot, or checkpoint path, and never builds or pushes a production image.
- Application jobs may package a JAR or Python project into a custom Flink image.
- Session jobs normally use an Operator-accessible HTTPS, S3, or HDFS
artifact URI. A
local://URI refers to the Operator pod filesystem, not merely the Session Cluster image. - A Flink 1.x SQL application needs a version-matched runner JAR. Flink 2.x can
use
org.apache.flink.table.runtime.application.SqlDriverfrom the system classpath with nojarURI; connector and filesystem JARs are still required.
The initial schema guidance targets the stable Operator 1.15 API while
discovering the actual flink.apache.org resource version from the target
cluster before generating a manifest.
Develop
uv run --package datus-flink-plugin pytest datus-flink-plugin
The suite renders every template, checks the documented invariants, and drives
run-local-sql.sh against a fake Flink distribution to prove each guard rejects
what it claims to reject. The package contains no runtime Python implementation
and never imports or depends on datus.
Metadata
Release files for datus-flink-plugin 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datus_flink_plugin-0.1.1.tar.gz | 37.8 kB | Without provenance | Details for datus_flink_plugin-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datus_flink_plugin-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for datus_flink_plugin-0.1.1-py3-none-any.whl |
Total release size: 68.7 kB
Release files / datus_flink_plugin-0.1.1.tar.gz
| Download URL | datus_flink_plugin-0.1.1.tar.gz |
|---|---|
| Size | 37.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5bfb2ce188c42530c2573aa238229be48462f096e573022b72357e7ac3781a1
|
|
BLAKE2b-256 checksum How to use checksums |
134e6bf020ce52b525d7ede6d0b1e842f162af25080b012d65026a0cac0f2647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / datus_flink_plugin-0.1.1-py3-none-any.whl
| Download URL | datus_flink_plugin-0.1.1-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e27e78900075508278de0bb1cced40f97b1478d71e91aa9f267bf7f8bdc2723
|
|
BLAKE2b-256 checksum How to use checksums |
7c49b16af425b9b580e27b346762f8e1e5e7f62d01609ec5d83360737e38e24f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for datus-flink-plugin 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.