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

Adding support for generating random timestamp between the given range. #33

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

nachivrn
Copy link
Contributor

Implementing a new type called 'random timestamp' to generate random timestamp values by specifying a configuration with a start and end time range, along with the desired format.

"timestamp": {
 "valueType": "randomtimestamp",
 "config": {
            "start":  "2023-01-01T00:00:00",
            "end":    "2023-12-31T23:59:59",
            "format": "2006-01-02T15:04:05",
            }
}

Nachiappan Veerappan Nachiappan added 2 commits September 16, 2024 19:06
and end time range and the format.

"timestamp": {
 "valueType": "randomtimestamp",
 "config": {
            "start":  "2023-01-01T00:00:00",
            "end":    "2023-12-31T23:59:59",
            "format": "2006-01-02T15:04:05",
            }
}
kylemumma
kylemumma approved these changes Sep 19, 2024
Copy link
Member

@kylemumma kylemumma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -107,6 +107,13 @@ func BuildField(config ClickhouseFieldRaw, partitions int, partition_id int) (Va
return nil, err
}
return value, nil

case "randomtimestamp":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be camelCase to follow naming conventions?

@onewland onewland merged commit 3642d29 into master Nov 26, 2024
2 checks passed
@onewland onewland deleted the clickhouse_random_timestamp branch November 26, 2024 17:41
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

Successfully merging this pull request may close these issues.

3 participants