How to use snowfakery - 3 common examples

To help you get started, we’ve selected a few snowfakery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SFDO-Tooling / CumulusCI / cumulusci / tasks / bulkdata / generate_from_yaml.py View on Github external
def generate_data(self, session, engine, base, num_records, current_batch_num):
        output_stream = SqlOutputStream.from_connection(
            session, engine, base, self.mappings
        )
        with open(self.yaml_file) as open_yaml_file:
            summary = generate(
                open_yaml_file, self.num_records, self.vars, output_stream
            )
            output_stream.close()
            if self.generate_mapping_file:
                with open(self.generate_mapping_file, "w+") as f:
                    yaml.safe_dump(
                        mapping_from_factory_templates(summary), f, sort_keys=False
                    )
                    f.close()
github SFDO-Tooling / CumulusCI / cumulusci / tasks / bulkdata / generate_from_yaml.py View on Github external
def generate_data(self, session, engine, base, num_records, current_batch_num):
        output_stream = SqlOutputStream.from_connection(
            session, engine, base, self.mappings
        )
        with open(self.yaml_file) as open_yaml_file:
            summary = generate(
                open_yaml_file, self.num_records, self.vars, output_stream
            )
            output_stream.close()
            if self.generate_mapping_file:
                with open(self.generate_mapping_file, "w+") as f:
                    yaml.safe_dump(
                        mapping_from_factory_templates(summary), f, sort_keys=False
                    )
                    f.close()
github SFDO-Tooling / CumulusCI / cumulusci / tasks / bulkdata / generate_from_yaml.py View on Github external
def generate_data(self, session, engine, base, num_records, current_batch_num):
        output_stream = SqlOutputStream.from_connection(
            session, engine, base, self.mappings
        )
        with open(self.yaml_file) as open_yaml_file:
            summary = generate(
                open_yaml_file, self.num_records, self.vars, output_stream
            )
            output_stream.close()
            if self.generate_mapping_file:
                with open(self.generate_mapping_file, "w+") as f:
                    yaml.safe_dump(
                        mapping_from_factory_templates(summary), f, sort_keys=False
                    )
                    f.close()

snowfakery

Snowfakery is a tool for generating fake data that has relations between tables. Every row is faked data, but also unique and random, like a snowflake.

BSD-3-Clause
Latest version published 1 month ago

Package Health Score

81 / 100
Full package analysis