<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DataStream Connectors on GCP Connectors for Apache Flink</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/</link><description>Recent content in DataStream Connectors on GCP Connectors for Apache Flink</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/index.xml" rel="self" type="application/rss+xml"/><item><title>BigQuery</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/bigquery/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/bigquery/</guid><description>&lt;h1 id="bigquery-connector"&gt;BigQuery Connector&lt;a class="anchor" href="#bigquery-connector"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;BigQuery sink for Apache Flink with a unified, &lt;code&gt;BigQueryIO&lt;/code&gt;-style write API, provided by the
&lt;code&gt;flink-connector-gcp-bigquery&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;One builder dispatches to a write-method implementation at job-graph construction time:&lt;/p&gt;


&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Sink&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MyEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sink&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BigQuerySink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MyEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeMethod&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WriteMethod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;STORAGE_API_AT_LEAST_ONCE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;destinationResolver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TableDestination&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;my-project&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;my_dataset&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;tableName&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;serializer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MyEventProtoSerializer&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Per-feature implementation status is tracked in the
&lt;a href="https://github.com/flink-gcp/flink-connector-gcp/blob/main/flink-connector-gcp-bigquery/README.md"&gt;module README&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="credentials"&gt;Credentials&lt;a class="anchor" href="#credentials"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;By default every BigQuery and Cloud Storage client uses application-default credentials (ADC).
Set &lt;code&gt;serviceAccountKeyFile(...)&lt;/code&gt; to use one service-account JSON key file instead:&lt;/p&gt;</description></item><item><title>Cloud Pub/Sub</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/pubsub/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/pubsub/</guid><description>&lt;h1 id="cloud-pubsub-connector"&gt;Cloud Pub/Sub Connector&lt;a class="anchor" href="#cloud-pubsub-connector"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Cloud Pub/Sub source and sink for Apache Flink, with multi-subscription consumption on the source
and dynamic per-record topic destinations on the sink, provided by the
&lt;code&gt;flink-connector-gcp-pubsub&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;Per-feature implementation status is tracked in the
&lt;a href="https://github.com/flink-gcp/flink-connector-gcp/blob/main/flink-connector-gcp-pubsub/README.md"&gt;module README&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="credential-file-deployment"&gt;Credential file deployment&lt;a class="anchor" href="#credential-file-deployment"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Authentication recommendation.&lt;/strong&gt; Google recommends &lt;a href="https://cloud.google.com/iam/docs/best-practices-service-accounts#choose-when-to-use"&gt;avoiding service-account keys whenever possible&lt;/a&gt;.
Prefer keyless application-default credentials from an attached service account or Workload Identity over a service-account key file.
Use &lt;code&gt;serviceAccountKeyFile(path)&lt;/code&gt; only when the job must select an explicit service account that the process environment cannot provide.&lt;/p&gt;</description></item><item><title>Cloud Tasks</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/cloudtasks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/cloudtasks/</guid><description>&lt;h1 id="cloud-tasks-connector"&gt;Cloud Tasks Connector&lt;a class="anchor" href="#cloud-tasks-connector"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Start with the &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/quickstart/cloudtasks/"&gt;Quickstart&lt;/a&gt; for the basic dispatch job,
or use the &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/examples/cloudtasks/"&gt;Cloud Tasks examples&lt;/a&gt; for dynamic queues,
Table sink requests, cross-connector pipelines, and local development.
The &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/table/cloudtasks/"&gt;Table connector&lt;/a&gt; owns DDL, formats,
writable metadata, and planner restrictions.&lt;/p&gt;
&lt;h2 id="overview-and-setup"&gt;Overview and setup&lt;a class="anchor" href="#overview-and-setup"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Cloud Tasks sink for Apache Flink, provided by the &lt;code&gt;flink-connector-gcp-cloudtasks&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;The sink ships in &lt;a href="https://github.com/flink-gcp/flink-connector-gcp/issues/24"&gt;#24&lt;/a&gt;, and App Engine targets join it in
&lt;a href="https://github.com/flink-gcp/flink-connector-gcp/issues/628"&gt;#628&lt;/a&gt;.
Its emulator integration tests are &lt;a href="https://github.com/flink-gcp/flink-connector-gcp/issues/25"&gt;#25&lt;/a&gt;.
This page doubles as the design record: it explains what the connector does and why each decision
was taken, so the reasoning is settled once rather than re-argued per pull request.&lt;/p&gt;</description></item><item><title>Bigtable</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/bigtable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/bigtable/</guid><description>&lt;h1 id="bigtable-connector"&gt;Bigtable Connector&lt;a class="anchor" href="#bigtable-connector"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Writes a DataStream into Cloud Bigtable, one row mutation per record, at-least-once, into a
fixed table or one each record names. Every
option is in the &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/reference/bigtable/"&gt;Bigtable reference&lt;/a&gt;; the runnable job is
the &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/quickstart/bigtable/"&gt;quickstart&lt;/a&gt;; implementation status is the table in
the module
&lt;a href="https://github.com/flink-gcp/flink-connector-gcp/tree/main/flink-connector-gcp-bigtable"&gt;README&lt;/a&gt;.&lt;/p&gt;


&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Sink&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;OrderEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sink&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BigtableSink&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;OrderEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TableDestination&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;my-project&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;my-instance&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;orders&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;serializer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RowMutationEntry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setCell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;cf&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;payload&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;timestampMicros&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="what-this-connector-is-for"&gt;What this connector is for&lt;a class="anchor" href="#what-this-connector-is-for"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bigtable is a wide-column store keyed by a single row key, and what a streaming pipeline usually
wants from it is a materialized view: the latest state per key, or an append-only history of events
under a key that a serving path reads by prefix. The sink is shaped for that — the record decides
its own row key and cells, and the sink&amp;rsquo;s whole job is to get mutations there in bounded memory and
to make a checkpoint mean something.&lt;/p&gt;</description></item><item><title>Spanner</title><link>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/spanner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/connectors/datastream/spanner/</guid><description>&lt;h1 id="spanner-connector"&gt;Spanner connector&lt;a class="anchor" href="#spanner-connector"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;An at-least-once sink applies one Spanner &lt;code&gt;Mutation&lt;/code&gt; per record.
The module also provides a bounded snapshot source and an unbounded Change Streams source.
Both dialects, GoogleSQL and PostgreSQL, are supported from the same code; the dialect is a property of the database rather than a builder option.&lt;/p&gt;
&lt;p&gt;Every option is listed on the &lt;a href="https://flink-gcp.github.io/flink-connector-gcp/1.0/docs/reference/spanner/"&gt;Spanner options&lt;/a&gt; page.&lt;/p&gt;
&lt;h2 id="credentials"&gt;Credentials&lt;a class="anchor" href="#credentials"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The bounded source, Change Streams source, and sink use Application Default Credentials when neither &lt;code&gt;serviceAccountKeyFile(...)&lt;/code&gt; nor &lt;code&gt;emulatorEndpoint(...)&lt;/code&gt; is set.
Set it only when the job must select a service-account JSON key that the runtime environment cannot supply through ADC.&lt;/p&gt;</description></item></channel></rss>