Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use Dataform CLI to run specific data model schedules or tags #1424

Closed
Prempi opened this issue Jan 9, 2023 · 3 comments
Closed

Can I use Dataform CLI to run specific data model schedules or tags #1424

Prempi opened this issue Jan 9, 2023 · 3 comments

Comments

@Prempi
Copy link

Prempi commented Jan 9, 2023

Like in the Topic, Is there a Dataform command line to run data model script based on schedules or tags

image

My purpose is to automatically trigger data model schedules and get the result(pass or fail) with Dataform command line, currently I have to manually trigger the schedule to test-run the data model script and its dependencies before the scheduled time.(Like in the image).

@BenBirt
Copy link
Contributor

BenBirt commented Jan 9, 2023

Yes:

➜  ~ dataform help run    
dataform run [project-dir]

Run the dataform project's scripts on the configured data warehouse.

Positionals:
  project-dir  The Dataform project directory.  [default: "."]

Options:
  --help           Show help  [boolean]
  --version        Show version number  [boolean]
  --dry-run        If set, built SQL is not run against the data warehouse and instead is printed to the console.  [boolean]
  --run-tests      If set, the project's unit tests are required to pass before running the project.  [boolean]
  --full-refresh   Forces incremental tables to be rebuilt from scratch.  [boolean] [default: false]
  --actions        A list of action names or patterns to run. Can include '*' wildcards.  [array]
  --tags           A list of tags to filter the actions to run.  [array]
  --include-deps   If set, dependencies for selected actions will also be run.  [boolean]
  --schema-suffix  A suffix to be appended to output schema names.
  --credentials    The location of the credentials JSON file to use.  [default: null]
  --json           Outputs a JSON representation of the compiled project.  [boolean] [default: false]
  --vars           Variables to inject via '--vars=someKey=someValue,a=b', referenced by `dataform.projectConfig.vars.someValue`.  [string] [default: null]
  --timeout        Duration to allow project compilation to complete. Examples: '1s', '10m', etc.  [string] [default: null]

i.e. you can use dataform run --tags ...

@BenBirt BenBirt closed this as completed Jan 9, 2023
@Prempi
Copy link
Author

Prempi commented Jan 12, 2023

@BenBirt Like it displays in dataform help run command, there is --include-deps option to include dependencies for selected actions to also run, so I curious if there is also option to include dependents for selected actions to also run.

@BenBirt
Copy link
Contributor

BenBirt commented Jan 13, 2023

Unfortunately not - but it would be quite easy to add! Feel free to contribute this yourself, or alternatively file a (separate) feature request issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants