Giter Club home page Giter Club logo

Comments (7)

sundy-li avatar sundy-li commented on July 19, 2024 1

Date is actually UInt16 in ClickHouse.
It can be a feature to have String to Date in GetValue()

from clickhouse_sinker.

toannhu96 avatar toannhu96 commented on July 19, 2024

@sundy-li That makes sense. I think we should support 2 types Date(String) or Date(UInt16) for this case

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

I faced such an issue.
In Kafka I have a JSON message with a date key which is in String format. {"date" = "2020-06-01"}
And if I try to save this message using sinker, I got "0000-00-00" in the table.
Is there any way to solve the issue without creating mat-view?

from clickhouse_sinker.

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024

@bun4uk you can go two ways
or you need to send an int or you can use ElasticDataTime type
image
example: https://github.com/housepower/clickhouse_sinker/blob/master/conf/tasks/logstash_sample.json

otherwise, you will need to write your own parser

from clickhouse_sinker.

bun4uk avatar bun4uk commented on July 19, 2024

@ArtemChekunov
thanks!
Am I right understood, in case of using ElasticDateTime type column type in the table should be Int64 type?

from clickhouse_sinker.

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024

@bun4uk only if you are going to go way far to the future =)

from clickhouse_sinker.

yuzhichang avatar yuzhichang commented on July 19, 2024

@bun4uk The master added support for converting number(integer, float) and string(you can customize layout at task config) to Date, DateTime, DateTime64.

from clickhouse_sinker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.