question

sulaiman avatar image
sulaiman asked

Can the BOM be removed from PlayStream archive events?

I've set up a S3 bucket for the PlayStream Event Archive. All the JSON events have a BOM prepended.

Is there a way to have these events be generated without the BOM? My JSON reader doesn't handle UTF-8 files that include a BOM.

analyticsPlayStream
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hernando avatar image
Hernando answered

For now, Playfab does not support modifying the encoding of PlayStream events. It might be a good idea to use a different JSON reader.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sulaiman avatar image
sulaiman answered

I tried using the Redshift COPY command to extract the JSON objects. Redshift can handle UTF16 with BOM but not UTF8.

Whats strange is that some playstream events like 'playfab.entity_logged_in' don't have the BOM while others like 'client_focus_change' do include the BOM.

Is the Redshift ETL not supported?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy avatar image Andy ♦♦ commented ·

It's not officially supported, but I know we have customers loading S3 data exports into redshift. What error do you get running the COPY command?

0 Likes 0 ·
sulaiman avatar image
sulaiman answered

The stl_load_errors table shows an error code of 1216(Invalid value) for those files.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy avatar image Andy ♦♦ commented ·

I think you've got two options. You can do some sort of processing on the data to remove the BOM before ingesting into redshift. There are many ways of doing that depending on the environment in which you're running the ingestion command. The other thing you could look at is using the acceptinvchars data conversion parameter. It might not lead to the precise desired outcome, though, so it wouldn't be my first choice.

0 Likes 0 ·
sulaiman avatar image sulaiman Andy ♦♦ commented ·

Thanks! I'll weight these options.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.