Skip to content

Commit 54fe3ef

Browse files
authored
Merge pull request #6358 from keboola/zajca/DMD-747/wherefilter_time_string
DMD-747 wherefilter time string
2 parents 01541c0 + ea14d4b commit 54fe3ef

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

apiary.apib

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,6 +3251,45 @@ Exported rows can be filtered by a single filter. Examples of filtering by `user
32513251
]
32523252
}
32533253
```
3254+
- Uses TIME_STRING type to filter by date/time values. Values are converted to timestamps. Equals to filtering by timestamp column.
3255+
```
3256+
{
3257+
"whereFilters": [
3258+
{
3259+
"column": "created_at",
3260+
"values": [
3261+
"2023-01-01 00:00:00",
3262+
],
3263+
"operator": "ge",
3264+
"type": "TIME_STRING"
3265+
}
3266+
]
3267+
}
3268+
{
3269+
"whereFilters": [
3270+
{
3271+
"column": "created_at",
3272+
"values": [
3273+
"1672531200"
3274+
],
3275+
"operator": "ge",
3276+
"type": "TIME_STRING"
3277+
}
3278+
]
3279+
}
3280+
{
3281+
"whereFilters": [
3282+
{
3283+
"column": "created_at",
3284+
"values": [
3285+
"-2 days"
3286+
],
3287+
"operator": "ge",
3288+
"type": "TIME_STRING"
3289+
}
3290+
]
3291+
}
3292+
```
32543293
- For multiple filters use multiple objects. All filters are joined by AND expression.
32553294
```
32563295
{
@@ -4199,6 +4238,11 @@ This request is [asynchronous](#introduction/synchronous-and-asynchronous-calls)
41994238
+ BIGINT - for number without a decimal point (BigQuery)
42004239
+ REAL - for number with a decimal point (BigQuery)
42014240
+ DECIMAL - for numbers (BigQuery)
4241+
+ type (optional, enum[string]) - type of filter values interpretation
4242+
+ Members
4243+
+ SCALAR - default value type interpretation (default)
4244+
+ TIME_STRING - values are interpreted as date/time strings and converted to timestamps. When using TIME_STRING, dataType must be empty. Values must be valid date/time strings compatible with strtotime() or unix timestamps. All time strings are converted to UTC timezone. Be aware of your backend timezone settings and daylight saving time changes.
4245+
+ Default: SCALAR
42024246
+ allowTruncate - (optional, boolean) is used to confirm that you really want to delete all rows in case you did not specify any filters.
42034247
+ default: false
42044248
@@ -10280,6 +10324,11 @@ Requesting changes will remove all approvals and move the Merge request to `deve
1028010324
+ BIGINT - for number without a decimal point (BigQuery)
1028110325
+ REAL - for number with a decimal point (BigQuery)
1028210326
+ DECIMAL - for numbers (BigQuery)
10327+
+ type (optional, enum[string]) - type of filter values interpretation
10328+
+ Members
10329+
+ SCALAR - default value type interpretation (default)
10330+
+ TIME_STRING - values are interpreted as date/time strings and converted to timestamps. When using TIME_STRING, dataType must be empty. Values must be valid date/time strings compatible with strtotime() or unix timestamps. All time strings are converted to UTC timezone. Be aware of your backend timezone settings and daylight saving time changes.
10331+
+ Default: SCALAR
1028310332
1028410333
1028510334
### CreateTableDefinitionAsyncBase

0 commit comments

Comments
 (0)