Skip to content

Commit

Permalink
rename RunDbtJob to RunDbtCloudJob
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Jan 23, 2023
1 parent 439e116 commit 46112e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mara_dbt/commands.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import shlex
from warnings import warn

from mara_page import _
from mara_pipelines.pipelines import Command
Expand Down Expand Up @@ -229,7 +230,7 @@ def shell_command(self):
'dbt-cloud')


class RunDbtJob(_DbtCloudCommand):
class RunDbtCloudJob(_DbtCloudCommand):
def __init__(self, job_id: int, cause: str = None, wait: bool = True):

"""
Expand All @@ -250,3 +251,10 @@ def shell_command(self):
+ f' job run --job-id {self.job_id}'
+ (f' --cause {shlex.quote(self.cause)}' if self.cause else '')
+ (' --wait' if self.wait else ''))


# deprecated. TBD: Remove in 1.0.0
class RunDbtJob(RunDbtCloudJob):
def __init_subclass__(cls) -> None:
warn("Class RunDbtJob has been renamed to RunDbtCloudJob", DeprecationWarning, stacklevel=2)
return super().__init_subclass__()

0 comments on commit 46112e2

Please sign in to comment.