def run_grant_dataset_view_access(self,<EOL>source_dataset,<EOL>view_dataset,<EOL>view_table,<EOL>source_project=None,<EOL>view_project=None):
<EOL>source_project = source_project if source_project else self.project_id<EOL>view_project = view_project if view_project else self.project_id<EOL>source_dataset_resource = self.service.datasets().get(<EOL>projectId=source_project, datasetId=source_dataset).execute(num_retries=self.num_retries)<EOL>access = source_dataset_resource[<EOL>'<STR_LIT>'] if '<STR_LIT>' in source_dataset_resource else []<EOL>view_access = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': view_project,<EOL>'<STR_LIT>': view_dataset,<EOL>'<STR_LIT>': view_table<EOL>}<EOL>}<EOL>if view_access not in access:<EOL><INDENT>self.log.info(<EOL>'<STR_LIT>',<EOL>view_project, view_dataset, view_table, source_project,<EOL>source_dataset)<EOL>access.append(view_access)<EOL>return self.service.datasets().patch(<EOL>projectId=source_project,<EOL>datasetId=source_dataset,<EOL>body={<EOL>'<STR_LIT>': access<EOL>}).execute(num_retries=self.num_retries)<EOL><DEDENT>else:<EOL><INDENT>self.log.info(<EOL>'<STR_LIT>',<EOL>view_project, view_dataset, view_table, source_project, source_dataset)<EOL>return source_dataset_resource<EOL><DEDENT>
Grant authorized view access of a dataset to a view table.
If this view has already been granted access to the dataset, do nothing.
This method is not atomic.  Running it may clobber a simultaneous update.

:param source_dataset: the source dataset
:type source_dataset: str
:param view_dataset: the dataset that the view is in
:type view_dataset: str
:param view_table: the table of the view
:type view_table: str
:param source_project: the project of the source dataset. If None,
    self.project_id will be used.
:type source_project: str
:param view_project: the project that the view is in. If None,
    self.project_id will be used.
:type view_project: str
:return: the datasets resource of the source dataset.