Package: turboyaml
turboyamlOverviewturboyaml is an AI-powered CLI utility designed to seamlessly convert complex dbt (Data Build Tool) SQL files into YAML format. With the power of OpenAI's advanced GPT-4 language model, this tool empowers data engineers and analysts to accelerate their data modeling and configuration management workflow.Key FeaturesAI-Powered Precision: Leverage the state-of-the-art OpenAI GPT-4 to ensure accurate and error-free YAML conversion, even for intricate SQL data models.Speed and Efficiency: turboyaml works at lightning speed, delivering YAML output within seconds, saving valuable time for data teams.Multiple File Processing: turboyaml now supports processing multiple dbt SQL files or an entire folder of files in a single command. Simply provide the folder path as the --select option, and turboyaml will process all the .sql files in the folder.Append to Existing YAML: turboyaml can append the generated YAML content to an existing YAML file instead of creating a new one. If the output YAML file already exists, turboyaml will append the new YAML content to it.InstallationTo install turboyaml, use the following command:pipinstallturboyamlCheck if the installation was successful:turboyaml--versionUsageTo harness the full potential of turboyaml in converting dbt SQL files to YAML, simply follow these steps:Single File ProcessingRun turboyaml from the command line, providing your OpenAI API key and the path to the dbt SQL file:turboyaml --api-key <your_openai_api_key> --select /path/to/your/dbt_file.sqlIf you have an OpenAI API key, provide it using the--api-keyoption. This method allows you to specify the API key directly in the command.Multiple File or Folder ProcessingTo process multiple dbt SQL files or an entire folder containing.sqlfiles, provide the folder path as the--selectoption:turboyaml --api-key <your_openai_api_key> --select /path/to/your/dbt_folder/If the--selectoption is a file path, turboyaml will process the single file as before.If the--selectoption is a folder path, turboyaml will process all the.sqlfiles in the folder.Appending to Existing YAMLTo append the generated YAML content to an existing YAML file, provide the YAML file name using the--yamloption:turboyaml --api-key <your_openai_api_key> --select /path/to/your/dbt_file.sql --yaml /path/to/your/existing_yaml.ymlIf the--yamloption is not provided, the output YAML file will have the same name as the input dbt SQL file, but with the.ymlextension.Using Environment VariableAlternatively, you can set the OpenAI API key as an environment variable namedOPENAI_API_KEY. If the--api-keyoption is not provided, turboyaml will automatically check for this environment variable and use it if available.export OPENAI_API_KEY=<your_openai_api_key>By setting the API key as an environment variable, you don't need to provide it explicitly every time you run turboyaml.Explore dbt SQL ModelsFor a diverse collection of SQL models and examples, you can explore the official dbt documentation:dbt SQL ModelsThe dbt documentation provides detailed information and examples of SQL models from various dbt projects. You can find a wide range of data modeling patterns and best practices that you can use as a reference for your own projects.Please note that the examples and content in the dbt documentation are subject to the licensing terms specified by dbt.ContributingContributions to turboyaml are welcome! If you'd like to contribute, please read our Contribution Guidelines for more information on how to submit a pull request.Licenseturboyaml is open-source software licensed under the MIT License.Version History0.0.1 (2023-07-25): Initial release.0.0.2 (2023-07-26): Added support for processing multiple files and unifying the output in a single YAML file. Implemented the--yamlparameter to specify the YAML output file. Updated the README with new functionalities and disclaimers. Improved error handling and logging.0.0.3 (2023-07-26): Bug fix and corrected typo0.0.4 (2023-08-08): Refactor of code and implemented async processing for performance optimization.FeedbackWe value your feedback! If you have any questions, suggestions, or encounter any issues while using turboyaml, please feel free to open an issue or reach out to us.Experience the power of AI-driven YAML generation with turboyaml. Say hello to a new era of effortless data modeling and configuration management!DisclaimerVerify and Review OutputThe generated YAML output from TurboYAML is produced using AI language models and may contain errors or inaccuracies. It is essential to review and verify the YAML code for correctness and alignment with your specific requirements. Always exercise caution and critical thinking when using the generated output.Experimental ToolTurboYAML leverages the capabilities of large language models like GPT-4. However, it is important to note that these models are experimental and may occasionally produce incorrect or offensive information. As a user, you should be mindful and careful when relying on the outputs provided by the tool.