Skip to content

feat(pubsublite): attributes field in sink example - #7405

Merged
anguillanneuf merged 2 commits into
mainfrom
pubsublite-spark-attributes
Jan 28, 2022
Merged

feat(pubsublite): attributes field in sink example#7405
anguillanneuf merged 2 commits into
mainfrom
pubsublite-spark-attributes

Conversation

@anguillanneuf

@anguillanneufanguillanneuf commented Jan 28, 2022

Copy link
Copy Markdown
Member

Because this bug was fixed in the Pub/Sub Lite Spark connector googleapis/java-pubsublite-spark#261 with a new release, we are now able to write to Pub/Sub Lite with an attributes field.

Updating the sample to show how to do that.

@anguillanneuf
anguillanneuf requested review from a team and hongalex as code ownersJanuary 28, 2022 01:05
@product-auto-labelproduct-auto-labelBot added api: pubsublite Issues related to the Pub/Sub Lite API. samples Issues that are directly related to samples. labels Jan 28, 2022
# |-- key: binary (nullable = false)
# |-- data: binary (nullable = true)
# |-- event_timestamp: timestamp (nullable = true)
# |-- attributes: map (nullable = false)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our guide and everywhere actually specifies attributes is nullable.

@jiangmichaelllljiangmichaellllJan 28, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but our code doesn't really check since they are compatible ie our codebase is ok with nullable, I think it's fine.

@anguillanneufanguillanneufJan 28, 2022

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiangmichaellll Yes, all the fields can be nulls. It's just we are printing out of the dataframe created by the code above.

@anguillanneuf
anguillanneufforce-pushed the pubsublite-spark-attributes branch 3 times, most recently from a3b327a to 6974675CompareJanuary 28, 2022 18:39
@anguillanneuf
anguillanneufforce-pushed the pubsublite-spark-attributes branch from 6974675 to 32a24fbCompareJanuary 28, 2022 18:41
@anguillanneufanguillanneuf added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 28, 2022
@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 28, 2022
@anguillanneuf
anguillanneuf merged commit d9078b5 into mainJan 28, 2022
@anguillanneuf
anguillanneuf deleted the pubsublite-spark-attributes branch January 28, 2022 19:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsubliteIssues related to the Pub/Sub Lite API.samplesIssues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@anguillanneuf@busunkim96@hongalex@jiangmichaellll@kokoro-team@kurtisvg