Exemplo n.º 1
0
    def from_json(cls, json):
        from src.commons.big_query.big_query_job_reference import \
            BigQueryJobReference
        job_reference = BigQueryJobReference.from_json(json["job_reference"])
        from src.commons.big_query.copy_job_async.post_copy_action_request import \
            PostCopyActionRequest

        post_copy_action_request = PostCopyActionRequest.from_json(
            json["post_copy_action_request"])

        return ResultCheckRequest(
            task_name_suffix=json["task_name_suffix"],
            copy_job_type_id=json["copy_job_type_id"],
            job_reference=job_reference,
            retry_count=json["retry_count"],
            post_copy_action_request=post_copy_action_request)
Exemplo n.º 2
0
    def from_json(cls, json):
        source_big_query_table = BigQueryTable.from_json(
            json["source_big_query_table"])
        target_big_query_table = BigQueryTable.from_json(
            json["target_big_query_table"])
        post_copy_action_request = PostCopyActionRequest.from_json(
            json["post_copy_action_request"])

        return CopyJobRequest(
            task_name_suffix=json["task_name_suffix"],
            copy_job_type_id=json["copy_job_type_id"],
            source_big_query_table=source_big_query_table,
            target_big_query_table=target_big_query_table,
            create_disposition=json["create_disposition"],
            write_disposition=json["write_disposition"],
            retry_count=json["retry_count"],
            post_copy_action_request=post_copy_action_request)