Skip to content

[Feature][HTTP] Set time parse format at HTTP Source #5469

Open
@ruanwenjun

Description

@ruanwenjun

Search before asking

  • I had searched in the feature and found no similar feature requirement.

Description

When I use the HTTP source to read data from an endpoint.

I got an error because a time field parse failed.

Caused by: java.time.format.DateTimeParseExceptionreate breakpoint : Text 2023-08-18 10:52:19'could not be parsed at index 10

I find we don't support to set the time format at HTTP source config, so when we have a specific time string, we can only use string as the field type.

Furthermore, I find in some other connector, we support to config a time format which will be used to parse the time field.

But this cannot work when we have different time formats in one schema.

Can we set this under the field level?

schema {
    field {
        id {
            type = int
            xx
        }
        createTime {
            type = timestamp
            format_type = "yyyyMMdd HH:mm:ss"
        }
   }


}

Usage Scenario

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions