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

bigquery_table: Add query to view definition #479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions plugins/modules/gcp_bigquery_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
required: false
type: dict
suboptions:
query:
description:
- The SQL query defining this view.
required: false
type: str
use_legacy_sql:
description:
- Specifies whether to use BigQuery's legacy SQL for this view .
Expand Down Expand Up @@ -633,6 +638,11 @@
returned: success
type: complex
contains:
query:
description:
- The SQL query defining this view.
returned: success
type: str
useLegacySql:
description:
- Specifies whether to use BigQuery's legacy SQL for this view .
Expand Down Expand Up @@ -1019,6 +1029,7 @@ def main():
view=dict(
type='dict',
options=dict(
query=dict(type='str'),
use_legacy_sql=dict(type='bool'),
user_defined_function_resources=dict(
type='list', elements='dict', options=dict(inline_code=dict(type='str'), resource_uri=dict(type='str'))
Expand Down Expand Up @@ -1297,6 +1308,7 @@ def __init__(self, request, module):
def to_request(self):
return remove_nones_from_dict(
{
u'query': self.request.get('query'),
u'useLegacySql': self.request.get('use_legacy_sql'),
u'userDefinedFunctionResources': TableUserdefinedfunctionresourcesArray(
self.request.get('user_defined_function_resources', []), self.module
Expand All @@ -1307,6 +1319,7 @@ def to_request(self):
def from_response(self):
return remove_nones_from_dict(
{
u'query': self.request.get('query'),
u'useLegacySql': self.request.get(u'useLegacySql'),
u'userDefinedFunctionResources': TableUserdefinedfunctionresourcesArray(
self.request.get(u'userDefinedFunctionResources', []), self.module
Expand Down
5 changes: 5 additions & 0 deletions plugins/modules/gcp_bigquery_table_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@
returned: success
type: complex
contains:
query:
description:
- The SQL query defining this view.
returned: success
type: str
useLegacySql:
description:
- Specifies whether to use BigQuery's legacy SQL for this view .
Expand Down