Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp conversion issue for big query connector #267

Open
manojgdhv opened this issue Apr 24, 2020 · 2 comments
Open

Timestamp conversion issue for big query connector #267

manojgdhv opened this issue Apr 24, 2020 · 2 comments

Comments

@manojgdhv
Copy link

manojgdhv commented Apr 24, 2020

I am using schema-less json with big query connector. I am storing number of milliseconds as a timestamp.

{
	"metadata": {
		"eventTime": 1587677792225,
                  ...
	}
}

I am getting following error while putting data in sync.

[row index 9]: invalid: Timestamp field value is out of range:1587677792225999872

To solve this I tried to add following configuration

 "transforms": "Cast",
 "transforms.Cast.type": "org.apache.kafka.connect.transforms.Cast$Value",
 "transforms.Cast.spec": "metadata.eventTime:int64"

Also , tried to use Timestamp converter

  "transforms": "TimestampConverter",
  "transforms.TimestampConverter.field": "metadata.eventTime",
  "transforms.TimestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.TimestampConverter.target.type": "Timestamp"

But it seems connect is just ignoring the nested fields.

Does it expected behaviour and is there any other alternative?

@manojgdhv manojgdhv changed the title Cast/Transform can be applied to nested fields Cast/Transform can not be applied on nested fields Apr 24, 2020
@manojgdhv manojgdhv changed the title Cast/Transform can not be applied on nested fields Timestamp conversion issue for big query connector Apr 24, 2020
@mtagle
Copy link
Contributor

mtagle commented May 4, 2020

This seems like more of an issue you are having with the kafka connect framework, rather than KCBQ specifically. Maybe you should bring this question to the confluent folks?

@CHarnel
Copy link

CHarnel commented Aug 1, 2023

I'm having the same issue right now with managed Kafka on Confluent Cloud.

@manojgdhv - have you ever resolved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants