2021-04-22 14:31:54 +03:00
|
|
|
type: bulk
|
2021-08-18 16:00:05 +03:00
|
|
|
args:
|
2021-10-12 20:58:46 +03:00
|
|
|
|
|
|
|
# === hasura_test ===
|
|
|
|
|
|
|
|
## track tables
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: Album
|
|
|
|
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: Artist
|
|
|
|
|
|
|
|
- type: bigquery_create_array_relationship
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: Artist
|
|
|
|
name: albums
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
2021-08-26 21:11:12 +03:00
|
|
|
name: Album
|
2021-10-12 20:58:46 +03:00
|
|
|
column_mapping:
|
|
|
|
artist_self_id: artist_other_id
|
|
|
|
|
|
|
|
|
|
|
|
- type: bigquery_create_object_relationship
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: Album
|
|
|
|
name: artist
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
2021-08-26 21:11:12 +03:00
|
|
|
name: Artist
|
2021-10-12 20:58:46 +03:00
|
|
|
column_mapping:
|
|
|
|
artist_other_id: artist_self_id
|
|
|
|
|
|
|
|
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: author
|
|
|
|
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
|
|
|
|
- type: bigquery_create_array_relationship
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: author
|
|
|
|
name: articles
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
2021-08-26 21:11:12 +03:00
|
|
|
name: article
|
2021-10-12 20:58:46 +03:00
|
|
|
column_mapping:
|
|
|
|
id: author_id
|
|
|
|
|
|
|
|
- type: bigquery_create_object_relationship
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
name: author
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
2021-08-26 21:11:12 +03:00
|
|
|
name: author
|
2021-10-12 20:58:46 +03:00
|
|
|
column_mapping:
|
|
|
|
author_id: id
|
|
|
|
|
|
|
|
- type: bigquery_create_select_permission
|
|
|
|
args:
|
|
|
|
role: published_only
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- is_published
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
filter:
|
|
|
|
is_published: true
|
|
|
|
|
|
|
|
- type: bigquery_create_select_permission
|
|
|
|
args:
|
|
|
|
role: exact_article_id
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
filter:
|
|
|
|
id: {'_eq': 2}
|
|
|
|
|
|
|
|
- type: bigquery_create_select_permission
|
|
|
|
args:
|
|
|
|
role: empty_perms
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
permission:
|
|
|
|
columns: []
|
|
|
|
filter: {}
|
|
|
|
|
|
|
|
- type: bigquery_create_select_permission
|
|
|
|
args:
|
|
|
|
role: user
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
- author_id
|
|
|
|
- is_published
|
|
|
|
- published_on
|
|
|
|
- created_at
|
|
|
|
filter: {}
|
|
|
|
|
|
|
|
- type: bigquery_create_select_permission
|
|
|
|
args:
|
|
|
|
role: test_timestamp_perm
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
filter:
|
|
|
|
created_at: {'_eq': '2008-12-25T07:30:02'}
|
|
|
|
|
|
|
|
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: all_types
|
|
|
|
|
|
|
|
# === hasura_global_limited ===
|
|
|
|
|
|
|
|
## track tables
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: hasura_global_limited
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedAlbum
|
|
|
|
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: hasura_global_limited
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedArtist
|
|
|
|
|
|
|
|
## create relationships
|
|
|
|
- type: bigquery_create_object_relationship
|
|
|
|
args:
|
|
|
|
source: hasura_global_limited
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedAlbum
|
|
|
|
name: artist
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedArtist
|
|
|
|
column_mapping:
|
|
|
|
artist_other_id: artist_self_id
|
|
|
|
|
|
|
|
- type: bigquery_create_array_relationship
|
|
|
|
args:
|
|
|
|
source: hasura_global_limited
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedArtist
|
|
|
|
name: albums
|
|
|
|
using:
|
|
|
|
manual_configuration:
|
|
|
|
remote_table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: LimitedAlbum
|
|
|
|
column_mapping:
|
|
|
|
artist_self_id: artist_other_id
|
2021-11-24 19:21:59 +03:00
|
|
|
|
|
|
|
# === hasura_test/bigquery2 ===
|
|
|
|
- type: bigquery_track_table
|
|
|
|
args:
|
|
|
|
source: bigquery2
|
|
|
|
table:
|
|
|
|
dataset: hasura_test
|
|
|
|
name: article2
|
|
|
|
|
|
|
|
- type: bigquery_create_remote_relationship
|
|
|
|
args:
|
|
|
|
name: author
|
|
|
|
source: bigquery2
|
|
|
|
table:
|
|
|
|
name: article2
|
|
|
|
dataset: hasura_test
|
2021-12-01 07:53:34 +03:00
|
|
|
definition:
|
|
|
|
to_source:
|
|
|
|
relationship_type: object
|
|
|
|
field_mapping:
|
|
|
|
author_id: id
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
dataset: hasura_test
|
2021-11-24 19:21:59 +03:00
|
|
|
|
|
|
|
- type: bigquery_create_remote_relationship
|
|
|
|
args:
|
|
|
|
name: articles2
|
|
|
|
source: bigquery
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
dataset: hasura_test
|
2021-12-01 07:53:34 +03:00
|
|
|
definition:
|
|
|
|
to_source:
|
|
|
|
relationship_type: array
|
|
|
|
field_mapping:
|
|
|
|
id: author_id
|
|
|
|
source: bigquery2
|
|
|
|
table:
|
|
|
|
name: article2
|
|
|
|
dataset: hasura_test
|