Skip to content

Conversation

@anguillanneuf
Copy link
Member

@anguillanneuf anguillanneuf commented Jan 28, 2022

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 owners January 28, 2022 01:05
@product-auto-label product-auto-label bot 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)

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.

Copy link

@jiangmichaellll jiangmichaellll Jan 28, 2022

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.

Copy link
Member Author

@anguillanneuf anguillanneuf Jan 28, 2022

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 anguillanneuf force-pushed the pubsublite-spark-attributes branch 3 times, most recently from a3b327a to 6974675 Compare January 28, 2022 18:39
@anguillanneuf anguillanneuf force-pushed the pubsublite-spark-attributes branch from 6974675 to 32a24fb Compare January 28, 2022 18:41
@anguillanneuf anguillanneuf added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 28, 2022
@kokoro-team kokoro-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 main Jan 28, 2022
@anguillanneuf anguillanneuf deleted the pubsublite-spark-attributes branch January 28, 2022 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsublite Issues related to the Pub/Sub Lite API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants