{"id":14901,"date":"2021-09-23T12:36:09","date_gmt":"2021-09-23T16:36:09","guid":{"rendered":"http:\/\/www.iri.com\/blog\/?p=14901"},"modified":"2024-09-23T13:50:14","modified_gmt":"2024-09-23T17:50:14","slug":"iri-script-reuse-techniques","status":"publish","type":"post","link":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/","title":{"rendered":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs"},"content":{"rendered":"<p><i>Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (S<\/i><i>ort Control Language)-compatible job design<\/i><i>. Designing for reuse can result in a smaller inventory of scripts; and reduce script development, maintenance and execution costs. This post covers several techniques for applying reuse concepts to IRI scripts.<\/i><\/p>\n<p>IRI software product users with structured data define their source and target metadata, and their data manipulations, in scripts that use the fourth generation CoSort <a href=\"https:\/\/www.iri.com\/products\/cosort\/sortcl\">SortCL language<\/a>. These job scripts are used in:<\/p>\n<ul>\n<li aria-level=\"1\"><a href=\"https:\/\/www.iri.com\/products\/cosort\">IRI CoSort<\/a> for big data sorting, transformation, cleansing, and reporting<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/www.iri.com\/products\/nextform\">IRI NextForm<\/a> for data type, file format and database table migration<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/www.iri.com\/products\/fieldshield\">IRI FieldShield<\/a> for structured data discovery and de-ID (masking)<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/www.iri.com\/products\/rowgen\">IRI RowGen<\/a> for generating safe, realistic flat-file or DB test data<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/www.iri.com\/products\/voracity\">IRI Voracity<\/a> for all of the above, plus ETL, CDC, wrangling, etc.<\/li>\n<\/ul>\n<h6><b>What is Reuse?<\/b><\/h6>\n<p>One common definition of reuse is building new software from existing software components.<\/p>\n<p>Reuse is like recycling.\u00a0 Materials (components) are reused to create new products.<\/p>\n<p>Usage of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Open-source_software\">Open Source Software (OSS)<\/a> in the development of other OSS and commercial software is a real world example of reuse.\u00a0 Building software that leverages OSS can result in lower costs and faster delivery of high quality software.<\/p>\n<h6><b>Accomplishing Reuse with SortCL Scripts<\/b><\/h6>\n<p>To accomplish reuse, you must look at a requirement and think about how a script can be built to accomplish more than one task. For example, sorting an employee file by multiple attributes (keys) like name, name within a job title, or by some other attributes in the file. In a moment, I will cover how to build a script that provides this type of sort key flexibility, along with other scenarios.<\/p>\n<p>The basic ways to accomplish reuse when developing SortCL scripts are to use environment variables and specification statements (\/SPECIFICATION).\u00a0 Environment variables and specification files are resolved at runtime, and can provide a great deal of flexibility for a single script file.<\/p>\n<p><strong>Environment Variables<\/strong> are variable names preceded by a $, and are replaced with the current operating system environment variable value at runtime prior to execution of the job script.<\/p>\n<p>The following depicts a PowerShell script that sets the value of an environment variable named\u00a0 sortKey to the value of Name prior to executing the EmployeesByDynamicKey SortCL job script.\u00a0 As a point of clarification, a $ is used in PowerShell to define variables for use in the PowerShell script.\u00a0 Environment variables are set in PowerShell using $Env:<i>environment variable name=value <\/i>syntax as shown below for the variable sortKey.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14908 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey.png\" alt=\"\" width=\"609\" height=\"174\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey.png 609w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-300x86.png 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/a><\/p>\n<p><b>SortCL Specification Statements<\/b> (\/SPECIFICATION) define a named file that contains one or more script statements; and is replaced by the contents of the file prior to execution.<\/p>\n<p>It is a best practice to create Data Definition Files (.ddf) for a set of field definitions and reference them in SortCL scripts.\u00a0 This allows for reuse of the field definitions within and across multiple scripts.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/spec-employeescsv.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14931 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/spec-employeescsv.png\" alt=\"\" width=\"389\" height=\"24\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/spec-employeescsv.png 389w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/spec-employeescsv-300x19.png 300w\" sizes=\"(max-width: 389px) 100vw, 389px\" \/><\/a><\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/Employee_csv.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14909 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/Employee_csv.png\" alt=\"\" width=\"646\" height=\"145\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/Employee_csv.png 646w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/Employee_csv-300x67.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<h6><b>Advantages of Reusable Scripts<\/b><\/h6>\n<p>Scripts that are reusable eliminate the need to create a new script for every situation.\u00a0 For example, a single script can be built to sort a file using different key fields or applying different filtering criteria.<\/p>\n<p>Creating a reusable script takes a little extra thought, but can result in reduced development, maintenance and execution costs.<\/p>\n<p>Now that we have covered how reuse can reduce costs and the SortCL syntax that facilitates reuse, I will walk through a series of examples that should provide a good foundation for incorporating reuse into your SortCL job scripts.<\/p>\n<h6><b>Achieving Reuse by Example<\/b><\/h6>\n<p>The EmployeesByName script shown below will be used as a basis for the reuse discussions that follow.\u00a0 This script is an example of a non-reusable SortCL job script that sorts a weekly employee file by name (last, first).<\/p>\n<p>Script<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14910 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName.png\" alt=\"\" width=\"653\" height=\"424\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName.png 653w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName-300x195.png 300w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/><\/a><\/p>\n<p>Input file sample &#8211; Unordered Data<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14911 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly.png\" alt=\"\" width=\"667\" height=\"176\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly.png 667w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly-300x79.png 300w\" sizes=\"(max-width: 667px) 100vw, 667px\" \/><\/a><\/p>\n<p>Output File sample &#8211; data ordered by last name, first name<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-14912 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName.png\" alt=\"\" width=\"667\" height=\"161\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName.png 738w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName-300x72.png 300w\" sizes=\"(max-width: 667px) 100vw, 667px\" \/><\/a><\/p>\n<p>As you can see in the output file above, specifying \/PROCESS=CSV resulted in the field names specified by the CDEF attribute to be written to the first record of the output file and all fields surrounded by quotes.<\/p>\n<h6><b>Reuse Example 1 &#8211; Field Definitions<\/b><\/h6>\n<p>As mentioned earlier, it is a best practice to create a Data Definition File (DDF) for a set of field definitions and reference the .ddf file with a \/SPECIFICATION statement in the SortCL job script.<\/p>\n<p>Creating a SortCL job script with a \/SPECIFICATION statement referencing a .ddf file instead of the individual \/FIELD statements, as shown above, would look like the EmployeesByName_ddf script below. The .ddf file is reusable for the input and output as they both contain the same fields.<\/p>\n<p>Executing the script will create the exact same file that the EmployeeByName script above did.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName_ddf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14913 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName_ddf.png\" alt=\"\" width=\"516\" height=\"282\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName_ddf.png 516w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByName_ddf-300x164.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<h6><b>Reuse Example 2 &#8211; Providing Sort Keys at Execution Time<\/b><\/h6>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-14914 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\" alt=\"\" width=\"748\" height=\"280\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png 927w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted-300x112.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted-768x287.png 768w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><\/p>\n<p>As mentioned earlier, we will now look at creating a script that is reusable for multiple sorting scenarios.\u00a0 Instead of starting from scratch, the EmployeesByName_ddf script can be modified by following these steps.<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Create files containing \/KEY statements for each field you want to sort on and place them in a KeyFiles Directory. For purposes of demonstration, I created five files with a .keys extension, as follows:<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/DeptNameSalary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14915 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/DeptNameSalary.png\" alt=\"\" width=\"535\" height=\"458\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/DeptNameSalary.png 535w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/DeptNameSalary-300x257.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/DeptNameSalary-350x300.png 350w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/a><\/p>\n<p>While a requirement to sort the file only by department name is unlikely, I created a file with the department name (DeptName.keys) so it could be reused in the DeptNameSalary and DeptNameEmplName key files by using a \/SPECIFICATION statement.<\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Make a copy of the EmployeesByName_ddf.scl file and name it EmployeesByDynamicKey.scl.<\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Change the script \/SORT statement by replacing the \/KEY statements with a \/SPECIFICATION statement as shown here.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/sort-spec-keys.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14916 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/sort-spec-keys.png\" alt=\"\" width=\"420\" height=\"52\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/sort-spec-keys.png 420w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/sort-spec-keys-300x37.png 300w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/><\/a><\/p>\n<p>A quick test with the IRI Workbench using Run Configuration, setting the value for the sortKey environment variable to Name on the Environment tab, and clicking the Run button validates the changes worked successfully.<\/p>\n<p>As expected the output file is sorted by employee name just like the script above.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-environment.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-14917 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-environment.png\" alt=\"\" width=\"750\" height=\"389\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-environment.png 848w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-environment-300x156.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-environment-768x398.png 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/p>\n<p>sortKey can now be set to the name of any of the .key files in the SortKeys directory created in step 1.\u00a0 Sorting using any other fields is as easy as creating a new .keys file and specifying it for the value of the sortKey environment value.<\/p>\n<p><strong>Step 4<\/strong><\/p>\n<p>Change the \/OUTFILE file name to use the sortKey environment variable.\u00a0 This will result in the output file name reflecting the sort sequence of the file.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/outfile-employeesweeklyby.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14918 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/outfile-employeesweeklyby.png\" alt=\"\" width=\"498\" height=\"22\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/outfile-employeesweeklyby.png 498w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/outfile-employeesweeklyby-300x13.png 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/a><\/p>\n<p>For example, specifying DeptNameEmplName as the value for sortKey will result in the execution of the script creating file EmployeesWeeklyByDeptNameEmplName.csv.<\/p>\n<p>The complete modified script is as follows:<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly-script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14919 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly-script.png\" alt=\"\" width=\"554\" height=\"267\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly-script.png 554w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeekly-script-300x145.png 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><\/a><\/p>\n<p>With this single SortCL job script multiple files can be created as shown in the following PowerShell script.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-ps1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14920 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-ps1.png\" alt=\"\" width=\"567\" height=\"358\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-ps1.png 567w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey-ps1-300x189.png 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/outputfiles-employeesweekly.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14921 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/outputfiles-employeesweekly.png\" alt=\"\" width=\"386\" height=\"115\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/outputfiles-employeesweekly.png 386w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/outputfiles-employeesweekly-300x89.png 300w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<h6><b>Reuse Example 3 &#8211; Field Predicates<\/b><\/h6>\n<p>This example demonstrates how to streamline <i>manual <\/i>creations of the script above and provide additional reuse capabilities by leveraging the \/FIELD_PREDICATE statement.<\/p>\n<p>A field predicate allows you to set default attributes like POSITION and SEPARATOR for the \/FIELD statements that follow it. Another benefit of removing the position parameter is that it allows you to remove or reorder fields without needing to update position numbers.<\/p>\n<p>Before continuing with the example, note that field predicate statements <i>are incompatible with IRI Workbench operations and third-party tools<\/i>. Those interfaces seed and\/or need verbose field statements for mapping and lineage uses with which predicate interferes.<\/p>\n<p>Converting the prior example to use field predicates can be done in three easy steps as follows:<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Create a copy of the EMPLOYEES_CSV.ddf used in the earlier examples. Then, streamline the file by removing the TYPE and SEPARATOR parameters from the \/FIELD statements.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/Employees_CSV2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14922 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/Employees_CSV2.png\" alt=\"\" width=\"400\" height=\"146\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/Employees_CSV2.png 400w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/Employees_CSV2-300x110.png 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Modify the script from above to use the .ddf file from Step1 and add a predicate statement prior to the specification statement for the input and output files.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/highlighted-modified-EmployeesWeekly-script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14923 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/highlighted-modified-EmployeesWeekly-script.png\" alt=\"\" width=\"454\" height=\"227\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/highlighted-modified-EmployeesWeekly-script.png 454w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/highlighted-modified-EmployeesWeekly-script-300x150.png 300w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/a><\/p>\n<p>Running a quick test validates the output matches the earlier runs.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14924 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName-2.png\" alt=\"\" width=\"746\" height=\"176\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName-2.png 746w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByName-2-300x71.png 300w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/a><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Modify the SEPARATOR parameter of the output file to be an environment variable.\u00a0 This will allow the same SortCL script to be used to produce output files with different separators.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/sep-highlighted.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14930 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/sep-highlighted.png\" alt=\"\" width=\"419\" height=\"16\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/sep-highlighted.png 419w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/sep-highlighted-300x11.png 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/a><\/p>\n<p>Testing the modified script specifying a vertical bar (|) and tilde (~) for the environment variable will result in the outputs below.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14925 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3.png\" alt=\"\" width=\"747\" height=\"179\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3.png 747w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3-300x72.png 300w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/a><\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3-tilde.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14926 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3-tilde.png\" alt=\"\" width=\"742\" height=\"175\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3-tilde.png 742w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesWeeklyByname-3-tilde-300x71.png 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/a><\/p>\n<h6><b>Reuse Example 4 &#8211; Extending Capabilities<\/b><\/h6>\n<p>The examples covered above demonstrate methods for creating SortCL job scripts that are reusable by using environment variables and specification statements within the context of the script. In this example, I cover two basic methods that can be used to add an additional output file to an existing job script.<\/p>\n<p>Producing more than one output in a single job script eliminates the need for multiple scripts.\u00a0 Creating multiple files in a single script results in reduced execution times and computing resource consumption, as the input file and sorting is only executed once.<\/p>\n<p><strong>Method 1 &#8211; Modify Existing Script<\/strong><\/p>\n<p>As shown below, the existing script from Example 2 was modified to add a new output file that contains only the employee Id and name.\u00a0 While the field choices I made were arbitrary, having to create a file without salary is a likely business scenario.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_ext.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14928 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_ext.png\" alt=\"\" width=\"590\" height=\"323\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_ext.png 590w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_ext-300x164.png 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p><strong>Method 2 &#8211; Include Existing Script<\/strong><\/p>\n<p>Method 1 above always creates the Employee List file.\u00a0 By creating and executing a separate script, like the EmployeesByDynamicKey_incl script shown below, you can control when the Employee List file gets created.<\/p>\n<p>Having a second script gives the flexibility of meeting an ad-hoc business need.\u00a0 For example, the Salary Administration department could run the EmployeesByDynamicKey job script whenever they need to, and the EmployeesByDynamicKey_incl below can be a regularly scheduled weekly job.<\/p>\n<p>As further explanation, using the specification statement in the script below allows the EmployeesByDynamicKey script to be reused.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_incl.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14927 aligncenter\" src=\"\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_incl.png\" alt=\"\" width=\"594\" height=\"174\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_incl.png 594w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/EmployeesByDynamicKey_incl-300x88.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/a><\/p>\n<h6><b>Summary<\/b><\/h6>\n<p>In this post, we discussed ways to potentially reduce costs through the creation and execution of reusable scripts, mainly through SortCL\u2019s support for environment variables and specification statements that are replaced prior to execution.<\/p>\n<p>These examples showed just a subset of things that can be accomplished by building reusable SortCL script files. The next time you create a new IRI job script, think about how you might make it more flexible, so that it can be reused in the future for a different scenario.<\/p>\n<p>Additional reuse ideas could involve specifying:<\/p>\n<ul>\n<li aria-level=\"1\">an encryption key value or file name<\/li>\n<li aria-level=\"1\">conditions for \/INCLUDE and \/OMIT statements<\/li>\n<li aria-level=\"1\">the name of a file containing keys to be used in a join to select records<\/li>\n<li aria-level=\"1\">the encryption (or other PII masking) routine name to be used<\/li>\n<li aria-level=\"1\">a file containing the SQL for a \/QUERY statement<\/li>\n<li aria-level=\"1\">the WHERE condition for a SQL statement specified by a \/QUERY statement<\/li>\n<li aria-level=\"1\">a value for a mathematical expression<\/li>\n<\/ul>\n<h6><b>Reusability Final Thoughts<\/b><\/h6>\n<p>Looking beyond the technical methods of reuse discussed above, an organization can realize significant value by:<\/p>\n<ul>\n<li aria-level=\"1\">Standardizing on a single enterprise field name to represent a unique business term across the enterprise, instead of using application specific names.\u00a0 A single field name will reduce confusion when collaborating with others across the organization.<\/li>\n<\/ul>\n<p>In Example 2, I created a file that contained \/KEY statements to sort the employee data by lastName and firstName. Standardizing these names across the enterprise allows any data to be sorted by name irrespective of the type of person the name represents (e.g. employees, applicants, student, patients, customers)<\/p>\n<ul>\n<li aria-level=\"1\">Using single field names for SortCL job scripts; and reporting and analytic tools.<\/li>\n<li aria-level=\"1\">Documenting field metadata to include items like definition, data type and valid values.<\/li>\n<li aria-level=\"1\">Providing an easy to use metadata search facility.<\/li>\n<li aria-level=\"1\">Leveraging data virtualization or data catalog tools to provide an enterprise view of data that is independent of which application manages the data or how it is stored.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job design. Designing for reuse can result in a smaller inventory of scripts; and reduce script development, maintenance and execution costs. This post covers several techniques for applying reuse concepts to IRI<\/p>\n<div><a class=\"btn-filled btn\" href=\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\" title=\"IRI Script Reuse Techniques for Fewer and More Flexible Jobs\">Read More<\/a><\/div>\n","protected":false},"author":151,"featured_media":14914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1,776,217,34,233],"tags":[6,561,1532,546,1204,1644,1530,1531],"class_list":["post-14901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-transformation2","category-etl","category-iri","category-business","category-metadata-management","tag-data-sorting","tag-ddf","tag-field-predicate","tag-iri-cosort","tag-iri-sortcl","tag-reusability","tag-script-reuse","tag-sortcl-specification-statement"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.4 (Yoast SEO v23.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>IRI Script Reuse Techniques for Fewer and More Flexible Jobs - IRI<\/title>\n<meta name=\"description\" content=\"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IRI Script Reuse Techniques for Fewer and More Flexible Jobs\" \/>\n<meta property=\"og:description\" content=\"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\" \/>\n<meta property=\"og:site_name\" content=\"IRI\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-23T16:36:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-23T17:50:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\" \/>\n\t<meta property=\"og:image:width\" content=\"927\" \/>\n\t<meta property=\"og:image:height\" content=\"347\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wade Donahue\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wade Donahue\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\"},\"author\":{\"name\":\"Wade Donahue\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/3c88af09f1d4fcdef7370a7abe64b732\"},\"headline\":\"IRI Script Reuse Techniques for Fewer and More Flexible Jobs\",\"datePublished\":\"2021-09-23T16:36:09+00:00\",\"dateModified\":\"2024-09-23T17:50:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\"},\"wordCount\":1928,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\",\"keywords\":[\"data sorting\",\"DDF\",\"field predicate\",\"IRI CoSort\",\"IRI SortCL\",\"reusability\",\"script reuse\",\"SortCL Specification Statement\"],\"articleSection\":[\"Data Transformation\",\"ETL\",\"IRI\",\"IRI Business\",\"Metadata Management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\",\"url\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\",\"name\":\"IRI Script Reuse Techniques for Fewer and More Flexible Jobs - IRI\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\",\"datePublished\":\"2021-09-23T16:36:09+00:00\",\"dateModified\":\"2024-09-23T17:50:14+00:00\",\"description\":\"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png\",\"width\":927,\"height\":347},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iri.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IRI Script Reuse Techniques for Fewer and More Flexible Jobs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iri.com\/blog\/#website\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"name\":\"IRI\",\"description\":\"Total Data Management Blog\",\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iri.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\",\"name\":\"IRI\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"width\":750,\"height\":206,\"caption\":\"IRI\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/3c88af09f1d4fcdef7370a7abe64b732\",\"name\":\"Wade Donahue\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cf07e37c128f0334168629cb154a3f8?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cf07e37c128f0334168629cb154a3f8?s=96&d=blank&r=g\",\"caption\":\"Wade Donahue\"},\"url\":\"https:\/\/www.iri.com\/blog\/author\/waded\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs - IRI","description":"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/","og_locale":"en_US","og_type":"article","og_title":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs","og_description":"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job","og_url":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/","og_site_name":"IRI","article_published_time":"2021-09-23T16:36:09+00:00","article_modified_time":"2024-09-23T17:50:14+00:00","og_image":[{"width":927,"height":347,"url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","type":"image\/png"}],"author":"Wade Donahue","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wade Donahue","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#article","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/"},"author":{"name":"Wade Donahue","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/3c88af09f1d4fcdef7370a7abe64b732"},"headline":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs","datePublished":"2021-09-23T16:36:09+00:00","dateModified":"2024-09-23T17:50:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/"},"wordCount":1928,"commentCount":0,"publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","keywords":["data sorting","DDF","field predicate","IRI CoSort","IRI SortCL","reusability","script reuse","SortCL Specification Statement"],"articleSection":["Data Transformation","ETL","IRI","IRI Business","Metadata Management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/","url":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/","name":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs - IRI","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage"},"image":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","datePublished":"2021-09-23T16:36:09+00:00","dateModified":"2024-09-23T17:50:14+00:00","description":"Designing for reuse is a common cost-saving technique used in the software industry that can be applied to IRI SortCL (Sort Control Language)-compatible job","breadcrumb":{"@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#primaryimage","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","width":927,"height":347},{"@type":"BreadcrumbList","@id":"https:\/\/www.iri.com\/blog\/etl\/iri-script-reuse-techniques\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iri.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IRI Script Reuse Techniques for Fewer and More Flexible Jobs"}]},{"@type":"WebSite","@id":"https:\/\/www.iri.com\/blog\/#website","url":"https:\/\/www.iri.com\/blog\/","name":"IRI","description":"Total Data Management Blog","publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iri.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iri.com\/blog\/#organization","name":"IRI","url":"https:\/\/www.iri.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","width":750,"height":206,"caption":"IRI"},"image":{"@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/3c88af09f1d4fcdef7370a7abe64b732","name":"Wade Donahue","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cf07e37c128f0334168629cb154a3f8?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cf07e37c128f0334168629cb154a3f8?s=96&d=blank&r=g","caption":"Wade Donahue"},"url":"https:\/\/www.iri.com\/blog\/author\/waded\/"}]}},"jetpack_featured_media_url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2021\/09\/iri-script-reuse-flow-highlighted.png","_links":{"self":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/14901"}],"collection":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/users\/151"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/comments?post=14901"}],"version-history":[{"count":11,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/14901\/revisions"}],"predecessor-version":[{"id":15419,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/14901\/revisions\/15419"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media\/14914"}],"wp:attachment":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media?parent=14901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/categories?post=14901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/tags?post=14901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}