Best Python code snippet using dbt-osmosis_python
osmosis.py
Source:osmosis.py
...871 ... # Model not found at patch path -- We should pass on this for now872 else:873 ... # Valid schema file found for model -- We will update the columns in the `Document` task874 return blueprint875 def commit_project_restructure_to_disk(876 self, blueprint: Optional[Dict[Path, SchemaFileMigration]] = None877 ) -> bool:878 """Given a project restrucure plan of pathlib Paths to a mapping of output and supersedes which is in itself a mapping of Paths to model names,879 commit changes to filesystem to conform project to defined structure as code fully or partially superseding existing models as needed.880 Args:881 blueprint (Dict[Path, SchemaFileMigration]): Project restructure plan as typically created by `build_project_structure_update_plan`882 Returns:883 bool: True if the project was restructured, False if no action was required884 """885 # Build blueprint if not user supplied886 if not blueprint:887 blueprint = self.draft_project_structure_update_plan()888 # Verify we have actions in the plan889 if not blueprint:...
main.py
Source:main.py
...103 fqn=fqn,104 dry_run=dry_run,105 )106 # Conform project structure & bootstrap undocumented models injecting columns107 if runner.commit_project_restructure_to_disk():108 runner.safe_parse_project()109 runner.propagate_documentation_downstream(force_inheritance=force_inheritance)110@yaml.command(context_settings=CONTEXT)111@shared_opts112@click.option(113 "-f",114 "--fqn",115 type=click.STRING,116 help="Specify models based on FQN. Use dots as separators. Looks like folder.folder.model or folder.folder.source.table. Use list command to see the scope of an FQN filter.",117)118@click.option(119 "-d",120 "--dry-run",121 is_flag=True,122 help="If specified, no changes are committed to disk.",123)124def organize(125 target: Optional[str] = None,126 project_dir: Optional[str] = None,127 profiles_dir: Optional[str] = None,128 fqn: Optional[str] = None,129 dry_run: bool = False,130):131 """Organizes schema ymls based on config and injects undocumented models132 \f133 This command will conform schema ymls in your project as outlined in `dbt_project.yml` & bootstrap undocumented dbt models134 Args:135 target (Optional[str]): Profile target. Defaults to default target set in profile yml136 project_dir (Optional[str], optional): Dbt project directory. Defaults to current working directory.137 profiles_dir (Optional[str], optional): Dbt profile directory. Defaults to ~/.dbt138 """139 logger().info(":water_wave: Executing dbt-osmosis\n")140 runner = DbtYamlManager(141 project_dir=project_dir,142 profiles_dir=profiles_dir,143 target=target,144 fqn=fqn,145 dry_run=dry_run,146 )147 # Conform project structure & bootstrap undocumented models injecting columns148 runner.commit_project_restructure_to_disk()149@yaml.command(context_settings=CONTEXT)150@shared_opts151@click.option(152 "-f",153 "--fqn",154 type=click.STRING,155 help="Specify models based on FQN. Use dots as separators. Looks like folder.folder.model or folder.folder.source.table. Use list command to see the scope of an FQN filter.",156)157@click.option(158 "-F",159 "--force-inheritance",160 is_flag=True,161 help="If specified, forces documentation to be inherited overriding existing column level documentation where applicable.",162)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!