Skip to main content
Version: 0.3.25

destinations.job_client_impl

SqlLoadJob Objects

class SqlLoadJob(LoadJob)

[view_source]

A job executing sql statement, without followup trait

SqlJobClientBase Objects

class SqlJobClientBase(JobClientBase, WithStateSync)

[view_source]

maybe_ddl_transaction

@contextlib.contextmanager
def maybe_ddl_transaction() -> Iterator[None]

[view_source]

Begins a transaction if sql client supports it, otherwise works in auto commit.

create_table_chain_completed_followup_jobs

def create_table_chain_completed_followup_jobs(
table_chain: Sequence[TTableSchema]) -> List[NewLoadJob]

[view_source]

Creates a list of followup jobs for merge write disposition and staging replace strategies

start_file_load

def start_file_load(table: TTableSchema, file_path: str,
load_id: str) -> LoadJob

[view_source]

Starts SqlLoadJob for files ending with .sql or returns None to let derived classes to handle their specific jobs

restore_file_load

def restore_file_load(file_path: str) -> LoadJob

[view_source]

Returns a completed SqlLoadJob or None to let derived classes to handle their specific jobs

Returns completed jobs as SqlLoadJob is executed atomically in start_file_load so any jobs that should be recreated are already completed. Obviously the case of asking for jobs that were never created will not be handled. With correctly implemented loader that cannot happen.

Arguments:

  • file_path str - a path to a job file

Returns:

  • LoadJob - A restored job or none

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.