{"repo":"daranzolin/sqltargets","free":true,"listed":false,"github":"https://github.com/daranzolin/sqltargets","clone":"git clone https://github.com/daranzolin/sqltargets.git","description":"targets extension for SQL queries","language":"R","stars":42,"topics":["pipeline","r","rstats","sql","targets","workflow"],"license":null,"category":"databases-storage","readme_excerpt":"sqltargets sqltargets makes it easy to integrate SQL files within your targets workflows. The shorthand tar sql() creates two targets: (1) the ‘upstream’ SQL file; and (2) the ‘downstream’ result of the query. Dependencies can be specified by calling tar load() within SQL comments. The template engine can be specified using the sqltargets.template engine option (either ‘dbi’, ‘glue’ or ‘jinjar’). ‘glue’ is the default, ‘dbi’ is the simplest using placeholders, and ‘jinjar’ is the most powerful. Installation You can install sqltargets from CRAN with: You can install the development version of sqltargets with: Demo See the sqltargets-demo repository for a reproducible demonstration. Dependencies Use tar load or targets::tar load within a SQL comment to indicate query dependencies. Check the dependencies of any query with tar sql deps . Parameters You can pass parameters (presumably from another object in your targets project) to tar sql() using one of two ‘template engines’: glue or ‘Jinja’ (courtesy of the ‘jinjar’ package.) Set the ‘template engine’ with sqltargets option set(\"sqltargets.template engine\", \"jinjar\") . (‘glue’ is the default.) With glue: query.sql targets.R With dbi: query.sql targets.R With ‘Jinja’: query.sql targets.R Note that loop.is last differs from typical Jinja ( loop.last ). Refer to this ‘jinjar’ vignette for other syntactical differences. Code of Conduct Please note that the sqltargets project is released with a Contributor Code of Conduct. By contri","default_branch":null,"files":null,"tree":[],"storefront":"/r/daranzolin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/daranzolin/sqltargets/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}