from utils.rc.client.requests import Requests
from utils.rc.client.auth import AuthClient
from utils.rc.dtos.project import Project
from utils.rc.dtos.dataset import Dataset
from utils.rc.dtos.recipe import Recipe
from utils.rc.dtos.env import Env
from utils.rc.dtos.env import EnvType
from utils.rc.dtos.transform import Transform
from utils.rc.dtos.template_v2 import TemplateV2, TemplateTransformV2
from utils.rc.dtos.segment import Segment, ItemExpression, Operator
from utils.rc.dtos.scenario import Scenario
from utils.rc.dtos.global_variable import GlobalVariable
from utils.rc.dtos.segment import ItemExpression, Operator, RecipeExpression
from utils.rc.dtos.project_run import ProjectRun
from utils.rc.dtos.dataSource import DataSource
from utils.rc.dtos.dataSource import DataSourceType
from utils.rc.dtos.dataSource import GcpConfig
import pandas as pd
import logging
from utils.utils.log_util import LogUtil
LogUtil.set_basic_config(format='%(levelname)s:%(message)s', level=logging.INFO)
Creating a job
The following code block is used to create a job within a project for a specific scenario.
The following code block is used to update the job schedule.
project_run.update_project_run('0 5 * * *')
Enabling and disabling the project run
The following code block is used to enable and disable the project run. Calling the disable function will turn the job inactive and set the status of the job to inactive whereas invoking the enable function will make the job active and set the job status to active.
project_run.disable_project_run()
project_run.enable_project_run()
Deleting the project run
Use this code block to delete the job you have created for the scenario within a project.
Configuring datasource destination to a specific job
Use this code block to configure the external data source destination to a particular job to save the output dataset after running the job to this destination.