Skip to content

Commit

Permalink
fix query_history stream
Browse files Browse the repository at this point in the history
  • Loading branch information
topefolorunso committed Apr 25, 2024
1 parent cc87fa3 commit 2b19470
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"query_history": {
"history_created_time": "2050-01-01T00:00:00Z"
"history.created_time": "2050-01-01T00:00:00Z"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["history_created_time"],
"source_defined_primary_key": [["query_id"], ["history_created_time"]]
"default_cursor_field": ["history.created_time"],
"source_defined_primary_key": [["query.id"], ["history.created_time"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,18 @@ definitions:
filters: >-
{"query.model": "-EMPTY", "history.runtime": "NOT NULL",
"user.is_looker": "No",}
# client_id: "AiRbYtE2{{ timestamp(stream_state[''history_created_time'']) }}0"
# client_id: "AiRbYtE2{{ timestamp(stream_state[''history.created_time'']) }}0"
# filter_expression: >-
# ${{history.created_time}} > {date_time({{ format_datetime(stream_state[''history_created_time''], '%Y') }}, {{ format_datetime(stream_state[''history_created_time''], '%m') }},
# {{ format_datetime(stream_state[''history_created_time''], '%d') }}, {{ format_datetime(stream_state[''history_created_time''], '%H') }}, {{ format_datetime(stream_state[''history_created_time''], '%M') }}, {{ format_datetime(stream_state[''history_created_time''], '%S') }})}
# ${{history.created_time}} > {date_time({{ format_datetime(stream_state[''history.created_time''], '%Y') }}, {{ format_datetime(stream_state[''history.created_time''], '%m') }},
# {{ format_datetime(stream_state[''history.created_time''], '%d') }}, {{ format_datetime(stream_state[''history.created_time''], '%H') }}, {{ format_datetime(stream_state[''history.created_time''], '%M') }}, {{ format_datetime(stream_state[''history.created_time''], '%S') }})}
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
primary_key:
- query_id
- history_created_time
- query.id
- history.created_time
user_sessions:
$ref: "#/definitions/looker_base_stream"
name: user_sessions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query_id": {
"query.id": {
"type": ["null", "integer"]
},
"history_created_date": {
"history.created_date": {
"type": ["null", "string"],
"format": "date"
},
"history_created_time": {
"history.created_time": {
"type": "string",
"format": "date-time"
},
"query_model": {
"query.model": {
"type": ["null", "string"]
},
"query_view": {
"query.view": {
"type": ["null", "string"]
},
"space_id": {
"space.id": {
"type": ["null", "integer"]
},
"look_id": {
"look.id": {
"type": ["null", "integer"]
},
"dashboard_id": {
"dashboard.id": {
"type": ["null", "integer"]
},
"user_id": {
"user.id": {
"type": ["null", "integer"]
},
"history_query_run_count": {
"history.query_run_count": {
"type": ["null", "integer"]
},
"history_total_runtime": {
"history.total_runtime": {
"multipleOf": 1e-20,
"type": ["null", "number"]
}
Expand Down

0 comments on commit 2b19470

Please sign in to comment.