Changelog¶
[0.11.2]¶
Fixed¶
- The list_environments method and CLI invocations
[0.11.1]¶
Fixed¶
- Versioning issue
[0.11.0]¶
Added¶
- New command line groups (e.g. instead of
dbtc list-accounts, you would usedbtc accounts list). Older methods are still around but will be deprecated in future versions. - New discovery API convenience methods to retrieve performance, recommendations, and other information
[0.10.0] - 2024-02-08¶
Added¶
- Semantic layer client. This can be accessed with the
slproperty on thedbtCloudClientclass (e.g.client.sl.query)
[0.9.0] - 2024-01-11¶
Removed¶
- All of the methods in the
_MetadataClientexcept forquery. The Discovery API no longer allows a user to specify every single field recursively, which is what thesgqlcpackage would do.
Added¶
- An optional keyword argument
use_beta_endpointto thedbtCloudClientclass. This will default toTrue, which means that the Discovery API will use the beta endpoint at https://metadata./beta/graphql instead of https://metadata. /graphql. This contains both the stable API resources (environment, models, tests, etc.) but also contains things for performance, recommendations, and lineage. - Ability to automatically paginate requests for the Discovery API. If pagination is required/desired, ensure that your query is properly created with an
$aftervariable and all of the fields within thepageInfofield.
Updated¶
- Loosen restrictions on Pydantic - ">=2.0,<3.0"
[0.8.0] - 2023-12-04¶
Added¶
retriesargument to thetrigger_jobmethod. This will allow you to retry a jobretriesamount of times until completion, which is defined assuccessorcancelled.
Updated¶
trigger_job_from_failuremethod to point at the newrerunendpoint. Logic is no longer necessary internally.
[0.7.0] - 2023-12-04¶
Added¶
outputflag can now be used to pipe output into files instead of stdout
Removed¶
- The
-oflag is no longer used for order-by when using that argument via the CLI; it is now used as an alternative for output (--outputor-o)
[0.6.0] - 2023-09-02¶
Updated¶
- Typer version to
0.9.0
[0.5.3] - 2023-08-09¶
- Remove read-only field
job_typefrom job payload before cloning job
[0.5.2] - 2023-07-30¶
Fixed¶
- Method used in the
update_environment_variablesmethod call fromPOSTtoPUT
[0.5.1] - 2023-07-30¶
Added¶
- Methods to update and list environment variables
[0.5.0] - 2023-07-28¶
Fixed¶
trigger_job_from_failuremethod encountering anIndexErrorwhen called for the first run of the jobassign_user_to_groupmethod now accepts aproject_idargumentdelete_user_groupmethod now accepts apayloadargument
[0.4.2] - 2023-04-03¶
Fixed¶
- How the base URL was constructed as it was not properly accounting for other regions, single tenant instances properly
[0.4.1] - 2023-04-02¶
Added¶
- Most recent updates for the Metadata API schema
[0.4.0] - 2023-03-18¶
Added¶
- List, test, create, get, update, and delete methods for webhooks
- Support for pydantic models used for validation logic when creating Webhooks - eventually will add support for other create methods
- Decorator that sets a private property on the
_Clientclass,_called_from, that helps understand when methods are called from another method.
Updated¶
list_usersis now using a v3 endpoint
Removed¶
- All v4 methods were removed as dbt Cloud will begin to deprecate their use soon
[0.3.7] - 2023-03-04¶
Added¶
- A
max_run_slotskeyword argument to thetrigger_autoscaling_ci_jobmethod. This will allow a user to limit the amount of run slots that can be occupied by CI jobs. The default value will be None, which will ensure that the normal behavior of this method remains intact (e.g. it will clone the CI job until the number of run slots configured for the account is reached).
[0.3.6] - 2023-02-28¶
Fixed¶
- An additional read-only field from a job definition needed to be removed prior to creating the cloned job. 500 errors were occuring because of this.
[0.3.5] - 2023-02-22¶
Added¶
versionargument to the CLI. Invoke withdbtc --version.- Ability to track what methods are being used. Important to note that you can opt out of this by passing
do_not_track=Trueto thedbtCloudClientclass. Additionally, nothing identifiable, like IDs, will be tracked - simply a way to understand what methods of the package are being used.
Fixed¶
- Bad type argument for
poll_intervalin the CLI method fortrigger-job-from-failure
[0.3.4] - 2023-01-27¶
Added¶
- Additional keyword arguments to filter the
list_projectsendpoint by -project_id,state,offset, andlimit. Theoffsetwill be useful if an account has greater than 100 (the max projects that can be returned) projects. - Additional keyword arguments to filter the
list_jobsendpoint by -environment_id,state,offset, andlimit. Important to note that theproject_idcan either be a single project_id integer or a list of project_ids - Convenience methods to return the most recent run,
get_most_recent_run, and the recent run artifact,get_most_recent_run_artifact. - Additional keyword arguments to filter the
list_environmentsendpoint by -dbt_version,name,type,state,offset, andlimit. Important to note that theproject_idcan either be a single project_id integer or a list of project_ids. fieldsargument to the methods on themetadataproperty. This allows you to limit the data returned from the Metadata API while still not having to write any GraphQL!querymethod on themetadataproperty. This allows you to write a GraphQL query and supply variables
Fixed¶
- A bug in
get_project_by_name - A bug in the CLI related to any methods that accept the
include_relatedargument. This is now valid syntax'["debug_logs", "run_steps"]'.
[0.3.3] - 2022-11-14¶
Fixed¶
- Autoscaling CI jobs were being improperly cloned when adding a commit to the same PR.
[0.3.2] - 2022-11-08¶
Fixed¶
- Finding in progress PR runs using the PR ID within the payload
[0.3.1] - 2022-11-07¶
Fixed¶
- In progress runs weren't properly being cancelled within the
trigger_autoscaling_ci_jobmethod. In addiiton to checking if the job has an in progress run, this method will now also check if there is a run in a "running" state for the PR ID given in the payload. This will ensure that a single PR can only have one run occuring at a given time (this wasn't the case in 0.3.0).
[0.3.0] - 2022-11-05¶
Added¶
trigger_autoscaling_ci_jobmethod to thecloudproperty of thedbtCloudClientclass.
Changed¶
- The restart from failure functionality has now been moved to it's own separate method,
trigger_job_from_failure. You'll still be able to trigger a job using thetrigger_jobmethod.
[0.2.4] - 2022-10-17¶
Fixed¶
- Non json artifacts are now able to be retrieved from
get_run_artifact
[0.2.3] - 2022-09-16¶
Fixed¶
- Bad url configuration for
create_jobmethod
[0.2.2] - 2022-09-15¶
Fixed¶
- Global CLI args
--warn-errorand--use-experimental-parserwere not being considered. If they were present in the command, the modified command would have been invalid. These are now included within themodified_commandif present in the initial step's command.
Added¶
--full-refreshflag is now being pulled in themodified_commandif present in the initial step's command.
[0.2.1] - 2022-08-31¶
Fixed¶
- Checking for an invalid result "skip" instead of "skipped" when identifying nodes that need to be reran.
[0.2.0] - 2022-08-30¶
Added¶
- The ability to restart a job from failure. The
trigger_jobmethod now accepts an argumentrestart_from_failure(defaultFalse) that will determine whether or not the last run attempt for a job was unsuccessful - in the event it was, it will parse the steps within that job and find the nodes that it needs to rerun as well as any steps that were skipped entirely. - Additional commands to the
trigger_jobmethod:should_poll- Indicate whether or not the method should poll for completion (defaultTrue)poll_interval- How long in between polling requests (default 10 seconds)restart_from_failure- Described abovetrigger_on_failure_only- Only relevant when settingrestart_from_failuretoTrue. This has the effect, when set toTrue, of only triggering the job when the prior invocation was not successful. Otherwise, the function will exit prior to triggering the job (defaultFalse)
- Logging to stderr when using the
trigger_jobmethod (internally using therichpackage that comes when installingTyper) - Multiple tests for the
restart_from_failurefunctionality
Removed¶
- The
trigger_job_and_pollmethod within thecloudproperty of thedbtCloudClientclass. The polling functionality is now rolled up into the singletrigger_jobmethod with the argumentshould_poll(default isTrue)
[0.1.4] - 2022-07-11¶
Added¶
get_model_by_environmentto themetadatapropertymetafield is now available when you query columns
[0.1.3] - 2022-07-08¶
Added¶
- The metadata methods are now available via the CLI
- A
statusarg can now be used in thelist_runsmethod on thecloudproperty
[0.1.2] - 2022-06-30¶
Fixed¶
- The
_dbt_cloud_requestprivate method, which is used in the CLI, now only usestyper.echoto return data from a request.
Changed¶
- The
trigger_job_and_pollmethod now returns theRun, represented as adict. It will no longer raise an exception if the result of the run is cancelled or error.
[0.1.1] - 2022-05-16¶
Added¶
- The
cloudproperty on thedbtCloudClientclass now contains v3 endpoints
[0.1.0] - 2022-05-13¶
Added¶
dbtCloudClientclass is the main interface to the dbt Cloud APIs. Thecloudproperty contains methods that allow for programmatic access to different resources within dbt Cloud (e.g.dbtCloudClient().cloud.list_accounts()). Themetadataproperty contains methods that allow for retrieval of metadata related to a dbt Cloud job run (e.g.dbtCloudClient().metadata.get_models(job_id, run_id)).dbtcis a command line interface to the methods on thedbtCloudClientclass (e.g.dbtc list-accounts)