%3CLINGO-SUB%20id%3D%22lingo-sub-1830122%22%20slang%3D%22en-US%22%3EPerformance%20Tune%20ADF%20Data%20Flow%20Transformations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1830122%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20the%20final%20part%20of%20my%20blog%20series%20on%20looking%20at%20performance%20metrics%20and%20tuning%20for%20ADF%20Data%20Flows.%20I%20collected%20the%20complete%20set%20of%20%3CA%20href%3D%22https%3A%2F%2Fwww.slideshare.net%2Fkromerm%2Fazure-data-factory-data-flow-performance-tuning-101%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eslides%20here%20to%20download%3C%2FA%3E.%20These%20are%20the%20previous%202%20blog%20posts%2C%20which%20focused%20on%20tuning%20and%20performance%20for%20data%20flows%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-data-factory%2Fuse-azure-ir-to-tune-adf-and-synapse-data-flows%2Fba-p%2F1715269%22%20target%3D%22_self%22%3EAzure%20IR%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-data-factory%2Fperformance-tuning-adf-data-flow-sources-and-sinks%2Fba-p%2F1781804%22%20target%3D%22_self%22%3Esources%20%26amp%3B%20sinks%3C%2FA%3E.%20In%20this%20post%2C%20I'll%20focus%20on%20performance%20profiles%20for%20data%20flow%20transformations.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1284903920%22%20id%3D%22toc-hId-1284903945%22%3ESchema%20Modifiers%3C%2FH3%3E%0A%3CP%3ESome%20of%20the%20more%20%22expensive%22%20transformation%20operations%20in%20ADF%20will%20be%20those%20that%20require%20large%20portions%20of%20your%20data%20to%20be%20grouped%20together.%20Schema%20modified%20like%20the%20Aggregate%20transformation%20and%20Window%20transformation%20group%20data%20into%20groups%20or%20windows%20for%20analytics%20and%20aggregations%20that%20require%20the%20merging%20of%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transf1.png%22%20style%3D%22width%3A%20561px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230059iBEBCFB74A867878A%2Fimage-dimensions%2F561x327%3Fv%3D1.0%22%20width%3D%22561%22%20height%3D%22327%22%20role%3D%22button%22%20title%3D%22transf1.png%22%20alt%3D%22transf1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20chart%20above%20shows%20sample%20timings%20when%20using%20the%20Aggregate%20transformation%20vs.%20the%20Window%20transformation.%20In%20both%20cases%2C%20you'll%20see%20similar%20performance%20profiles%20that%20both%20gain%20processing%20speed%20as%20you%20add%20more%20cores%20to%20the%20Azure%20IR%20compute%20settings%20for%20data%20flows.%20They%20will%20also%20perform%20better%20using%20Memory%20Optimized%20or%20General%20Purpose%20options%20since%20the%20VMs%20for%20those%20Spark%20clusters%20will%20have%20a%20higher%20RAM-per-core%20ratio.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20many%20situations%2C%20you%20may%20just%20need%20to%20generate%20unique%20keys%20across%20all%20source%20data%20or%20rank%20an%20entire%20data%20set.%20If%20you%20are%20performing%20those%20common%20operations%20in%20Aggregate%20or%20Windows%20and%20you%20are%20not%20grouping%20or%20generating%20windows%20across%20all%20of%20the%20data%20using%20functions%20such%20as%20rowNumber()%2C%20rank()%2C%20or%20denseRank()%2C%20then%20you%20will%20see%20better%20performance%20to%20instead%20use%20the%3CSTRONG%3E%20Surrogate%20Key%20transform%20for%20unique%20keys%20and%20row%20numbers%3C%2FSTRONG%3E%2C%20and%20the%20%3CSTRONG%3ERank%20transformation%20for%20rank%20or%20dense%20rank%20across%20the%20entire%20data%20set.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--522550543%22%20id%3D%22toc-hId--522550518%22%3EMultiple%20Inputs%2FOutputs%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transf2.png%22%20style%3D%22width%3A%20571px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230255i1E369E9820D3228C%2Fimage-dimensions%2F571x327%3Fv%3D1.0%22%20width%3D%22571%22%20height%3D%22327%22%20role%3D%22button%22%20title%3D%22transf2.png%22%20alt%3D%22transf2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20chart%20above%20shows%20that%20Joins%2C%20Lookups%2C%20and%20Exists%20can%20all%20generally%20scale%20proportionally%20as%20you%20add%20more%20cores%20to%20your%20data%20flow%20compute%20IRs.%20In%20many%20cases%2C%20you%20will%20need%20to%20use%20transformations%20that%20require%20multiple%20inputs%20such%20as%20Join%2C%20Exists%2C%20Lookup.%20Lookup%20is%20essentially%20a%20left%20outer%20join%20with%20a%20number%20of%20additional%20features%20for%20choosing%20single%20row%20or%20multiple%20row%20outputs.%20Exists%20is%20similar%20to%20a%20SQL%20exists%20operator%20that%20looks%20for%20the%20existence%2C%20or%20non-existence%2C%20of%20values%20in%20another%20data%20stream.%20In%20ADF%20Data%20Flows%2C%20you'll%20see%20from%20the%20chart%20above%2C%20that%20lookup%20contains%20a%20bit%20more%20overhead%20than%20the%20other%20similar%20transformations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20deduping%20data%20it%20is%20recommended%20to%20use%20Aggregate%20instead%20of%20Join%20and%20use%20Lookups%20when%20you%20need%20to%20reduce%20left%20outer%20joins%20with%20a%20single%20operation%2C%20choosing%20%22Any%20Row%22%20as%20the%20fastest%20operation.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transf3.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230341iE9C899B0EB07D8F5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22transf3.png%22%20alt%3D%22transf3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1964962290%22%20id%3D%22toc-hId-1964962315%22%3ERow%20Modifiers%3C%2FH3%3E%0A%3CP%3ERow%20modifiers%20like%20Filter%2C%20Alter%20Row%2C%20and%20Sort%2C%20have%20very%20different%20performance%20profiles.%20Data%20flows%20execute%20on%20Spark%20big%20data%20compute%20clusters%2C%20so%20it%20is%20not%20recommended%20in%20most%20cases%20to%20use%20Sort%20because%20it%20can%20be%20an%20expensive%20compute%20operation%20that%20can%20force%20Spark%20to%20shuffle%20data%20and%20reduces%20the%20benefit%20of%20a%20distributed%20data%20environment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlter%20Row%20is%20used%20to%20simply%20tag%20rows%20for%20different%20database%20profiles%20(update%2C%20insert%2C%20upsert%2C%20delete)%20and%20Filter%20will%20reduce%20the%20number%20of%20rows%20coming%20out%20of%20the%20transformation.%20Both%20are%20very%20low-cost%20transformations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1830122%22%20slang%3D%22en-US%22%3E%3CP%3EPart%203%20of%203%20focused%20on%20performance%20profiles%20and%20tuning%20Azure%20Data%20Factory%20data%20flows.%20In%20this%20post%2C%20I'll%20focus%20on%20tuning%20transformations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transf3.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F229989iFEE16FA10209A052%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22transf3.png%22%20alt%3D%22transf3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1830122%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Data%20Factory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20ETL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMapping%20Data%20Flows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

This is the final part of my blog series on looking at performance metrics and tuning for ADF Data Flows. I collected the complete set of slides here to download. These are the previous 2 blog posts, which focused on tuning and performance for data flows with the Azure IR and sources & sinks. In this post, I'll focus on performance profiles for data flow transformations.

Schema Modifiers

Some of the more "expensive" transformation operations in ADF will be those that require large portions of your data to be grouped together. Schema modified like the Aggregate transformation and Window transformation group data into groups or windows for analytics and aggregations that require the merging of data.

 

transf1.png

The chart above shows sample timings when using the Aggregate transformation vs. the Window transformation. In both cases, you'll see similar performance profiles that both gain processing speed as you add more cores to the Azure IR compute settings for data flows. They will also perform better using Memory Optimized or General Purpose options since the VMs for those Spark clusters will have a higher RAM-per-core ratio.

 

In many situations, you may just need to generate unique keys across all source data or rank an entire data set. If you are performing those common operations in Aggregate or Windows and you are not grouping or generating windows across all of the data using functions such as rowNumber(), rank(), or denseRank(), then you will see better performance to instead use the Surrogate Key transform for unique keys and row numbers, and the Rank transformation for rank or dense rank across the entire data set.

Multiple Inputs/Outputs

transf2.png

 

The chart above shows that Joins, Lookups, and Exists can all generally scale proportionally as you add more cores to your data flow compute IRs. In many cases, you will need to use transformations that require multiple inputs such as Join, Exists, Lookup. Lookup is essentially a left outer join with a number of additional features for choosing single row or multiple row outputs. Exists is similar to a SQL exists operator that looks for the existence, or non-existence, of values in another data stream. In ADF Data Flows, you'll see from the chart above, that lookup contains a bit more overhead than the other similar transformations.

 

When deduping data it is recommended to use Aggregate instead of Join and use Lookups when you need to reduce left outer joins with a single operation, choosing "Any Row" as the fastest operation.

transf3.png

Row Modifiers

Row modifiers like Filter, Alter Row, and Sort, have very different performance profiles. Data flows execute on Spark big data compute clusters, so it is not recommended in most cases to use Sort because it can be an expensive compute operation that can force Spark to shuffle data and reduces the benefit of a distributed data environment.

 

Alter Row is used to simply tag rows for different database profiles (update, insert, upsert, delete) and Filter will reduce the number of rows coming out of the transformation. Both are very low-cost transformations.

www.000webhost.com