Project-level Controls (sheetwork_project.yml)
Settings that can be set to apply to all your sheets within a given sheetwork project's scope.
Project Name
project_name: holds a string with the name of the project you are running
The project name must correspond to a top-level entry in profiles.yml and there must be a ./sheetwork/google/<project_name>.json with the credentials corrsponding to the project. See connection to Google Sheets for more info
Objects creation (tables & schemas)
The sheetwork_project.yml can store the following project-level settings
always_create_table: when set totruetable objects will be created if they do not exist.destructive_create_table: when set totruetables will be replaced (or dropped) first and their content will be fully overwritten. When set tofalsecontent will be appended provided the structure of the table has not changed. If that is the case you will likely get aDatabaseErrortelling you that there is a column mismatch.
always_create_schema: when set totruethe target schema will first be created if it does not exist.target_schemaa project-wide default schema in which to create the tables (can be overriden in the sheets.yml or via CLI).
The following controls can be overridden via CLI arguments at runtime
If you do not wish to provide project-level defaults, you will have to make sure you provide flags on the CLI to control object creation. By default, sheetwork does not create objects to prevent surprises.
--create_tablewhen passed on the CLI tables will be created if they do not exist.--create_schemawhen passed on the CLI schema will be created if they do not exist.--destructive_create_tablewill make replace the old target table with the new one (either via thereplacecommand ordropandcreatedepending on your database).--schemaprovide or override any of the project- or profile- level target schema specifications.
Last updated
Was this helpful?