%3CLINGO-SUB%20id%3D%22lingo-sub-1457836%22%20slang%3D%22en-US%22%3EHow%20Azure%20Synapse%20Analytics%20helps%20you%20analyze%20COVID%20data%20with%20Synapse%20SQL%20serverless%20endpoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1457836%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Foverview-what-is%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Synapse%20Analytics%3C%2FA%3E%20is%20a%20limitless%20data%20analytics%20service%20that%20enables%20you%20to%20analyze%20data%20on%20Azure%20DataLake%20storage.%20It%20provides%20managed%20Apache%20Spark%20and%20T-SQL%20engines%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fsql-data-warehouse%2Fsql-data-warehouse-overview-what-is%3Ftoc%3D%2Fazure%2Fsynapse-analytics%2Ftoc.json%26amp%3Bbc%3D%2Fazure%2Fsynapse-analytics%2Fbreadcrumb%2Ftoc.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eprovisioned%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fsql%2Fon-demand-workspace-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eserverless%3C%2FA%3E)%20for%20analyzing%20data.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20article%2C%20you%20will%20see%20how%20you%20can%20analyze%20the%20distribution%20of%20COVID%20cases%20reported%20in%20Serbia%20(Europe)%20using%20Synapse%20SQL%20endpoint%20in%20Synapse%20Analytics.%20Synapse%20SQL%20engine%20is%20the%20perfect%20choice%20for%20ad-hoc%20data%20analytics%20for%20the%20data%20analysts%20with%20T-SQL%20skills.%20The%20data%20set%20is%20placed%20on%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fopen-datasets%2Fcatalog%2Fecdc-covid-19-cases%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20storage%3C%2FA%3E%20and%20formatted%20as%20parquet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1325744944%22%20id%3D%22toc-hId--1325744944%22%20id%3D%22toc-hId--1325744944%22%20id%3D%22toc-hId--1325744944%22%3EPrerequisite%3C%2FH2%3E%0A%3CP%3ETo%20try%20this%20sample%2C%20you%20need%20to%20have%20-ERR%3AREF-NOT-FOUND-Azure%20Synapse%20Analytics%20workspace.%20If%20you%20don%E2%80%99t%20have%20one%20you%20can%20easily%20deploy%20it%20using%20-ERR%3AREF-NOT-FOUND-Azure%20portal%20or%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fquickstart-create-workspace%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDeployment%20template%3C%2FA%3E.%20Workspace%20automatically%20deploys%20one%20serverless%20Synapse%20SQL%20endpoint%20that%20is%20everything%20we%20need%20for%20this%20kind%20of%20analysis.%20With%20the%20workspace%20you%20are%20also%20getting%20easy-to-use%20Web%20UI%20called%20Synapse%20Studio%20that%20enables%20you%20to%20start%20analyzing%20the%20files%20directly%20from%20your%20browser.%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSTRONG%3ENOTE%3A%20You%20need%20Synapse%20SQL%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fsql%2Fon-demand-workspace-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eserverless%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(on-demand)%20query%20endpoint%20to%20execute%20the%20code%20in%20this%20article.%20The%20functionalities%20used%20in%20this%20article%20are%20still%20not%20available%20in%26nbsp%3B%5B%23%24dp25%5D%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsynapse-analytics%2Fsql-data-warehouse%2Fsql-data-warehouse-overview-what-is%3Ftoc%3D%2Fazure%2Fsynapse-analytics%2Ftoc.json%26amp%3Bbc%3D%2Fazure%2Fsynapse-analytics%2Fbreadcrumb%2Ftoc.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eprovisioned%3C%2FA%3E%E2%80%AF%20endpoint.%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1161767889%22%20id%3D%22toc-hId-1161767889%22%20id%3D%22toc-hId-1161767889%22%20id%3D%22toc-hId-1161767889%22%3ECOVID%20data%20set%3C%2FH2%3E%0A%3CP%3EIn%20this%20sample%20is%20used%20the%20latest%20available%20public%20data%20on%20geographic%20distribution%20of%20COVID-19%20cases%20worldwide%20from%20the%20-ERR%3AREF-NOT-FOUND-European%20Center%20for%20Disease%20Prevention%20and%20Control%20(ECDC).%20Each%20row%2Fentry%20contains%20the%20number%20of%20new%20cases%20reported%20per%20day%20and%20per%20country.%20For%20more%20information%20about%20this%20dataset%2C%20see%26nbsp%3B%5B%23%24dp17%5D%3CA%20href%3D%22https%3A%2F%2Fwww.ecdc.europa.eu%2Fen%2Fpublications-data%2Fdownload-todays-data-geographic-distribution-covid-19-cases-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20Data%20set%20is%20updated%20on%20daily%20basis%20and%20placed%20as%20a%20part%20of%20%5B%23%24dp18%5D%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fopen-datasets%2Fcatalog%2Fecdc-covid-19-cases%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Open%20Dataset%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--645686574%22%20id%3D%22toc-hId--645686574%22%20id%3D%22toc-hId--645686574%22%20id%3D%22toc-hId--645686574%22%3EOPENROWSET%20function%3C%2FH2%3E%0A%3CP%3ESynapse%20SQL%20endpoint%20in%20Synapse%20Analytics%20enables%20you%20to%20use%20-ERR%3AREF-NOT-FOUND-OPENROWSET%20T-SQL%20function%20to%20analyze%20data%20in%20Azure%20Data%20Lake%20storage.%20This%20is%20easy%20to%20use%20function%20where%20you%20just%20need%20to%20provide%20URL%20of%20some%20file%20on%20Azure%20storage%20and%20you%20will%20get%20the%20content%20of%20the%20file.%20Example%20of%20-ERR%3AREF-NOT-FOUND-OPENROWSET%20function%20that%20reads%20the%20content%20of%20a%20parquet%20file%20placed%20on%20Azure%20storage%20is%20shown%20in%20the%20following%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-sql%22%3E%3CCODE%3Eselect%26nbsp%3B*%0Afrom%26nbsp%3Bopenrowset(bulk%26nbsp%3B'https%3A%2F%2F****.blob.core.windows.net%2F...%2Fcases.parquet'%2C%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3Bformat%3D'parquet')%26nbsp%3Bas%26nbsp%3Bcases%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20provide%20a%20file%20URL%20after%20the%20%3CSTRONG%3Ebulk%3C%2FSTRONG%3E%20keyword%20and%20specify%20that%20you%20are%20using%20parquet%20format%2C%20you%20will%20get%20the%20content%20of%20that%20parquet%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1841826259%22%20id%3D%22toc-hId-1841826259%22%20id%3D%22toc-hId-1841826259%22%20id%3D%22toc-hId-1841826259%22%3EAnalyzing%20COVID%20dataset%3C%2FH2%3E%0A%3CP%3EProbably%20the%20easiest%20tool%20that%20you%20can%20use%20to%20analyze%20the%20file%20is%26nbsp%3B-ERR%3AREF-NOT-FOUND-Synapse%20Studio%20%E2%80%93%20Web%20UI%20where%20you%20can%20write%20a%20T-SQL%20query%20and%20see%20the%20results%20in%20browser.%3C%2FP%3E%0A%3CP%3EWe%20can%20begin%20analysis%20by%20exploring%20the%20columns%20in%20data%20set%20on%20first%2010%20records%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JovanPop_0-1591919436320.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198268i5BB7B99B1FADBED9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22JovanPop_0-1591919436320.png%22%20alt%3D%22JovanPop_0-1591919436320.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHere%20I%20can%20see%20that%20some%20of%20the%20columns%20interesting%20for%20analysis%20are%20DATE_REP%20and%20CASES.%20I%20would%20like%20to%20analyze%20number%20of%20cases%20reported%20in%20Serbia%2C%20so%20I%20would%20need%20to%20filter%20the%20results%20using%20GEO_ID%20column.%3C%2FP%3E%0A%3CP%3EI%E2%80%99m%20not%20sure%20what%20is%20geo_id%20value%20for%20Serbia%2C%20so%20I%20will%20find%20all%20distinct%20countries%20and%20geo_id%20values%20where%20country%20is%20something%20like%20Serbia%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JovanPop_1-1591919436335.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198267i2CA50604589103EA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22JovanPop_1-1591919436335.png%22%20alt%3D%22JovanPop_1-1591919436335.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHere%20I%20can%20find%20that%20the%20value%20that%20I%20should%20use%20for%20filtering%20is%20%E2%80%98RS%E2%80%99.%20Now%20I%20can%20use%20this%20value%20to%20filter%20the%20records%20that%20represent%20reported%20cases%20in%20%E2%80%98Serbia%E2%80%99%20and%20get%20date%20when%20the%20case%20is%20reported%20and%20number%20of%20cases.%20In%20addition%2C%20I%20will%20sort%20these%20values%20by%20date%20reported%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JovanPop_2-1591919436346.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198269i2DB473071719F005%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22JovanPop_2-1591919436346.png%22%20alt%3D%22JovanPop_2-1591919436346.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20can%20easily%20export%20data%20set%20with%20the%20number%20of%20cases%20reported%20in%20Serbia%20as%20CSV%2C%20Excel%2C%20or%20some%20other%20file%20type%2C%20so%20we%20can%20apply%20some%20offline%20client-side%20machine%20learning%20using%20Python%20or%20R%20or%20some%20other%20offline%20tool.%20In%20this%20case%20data%20set%20is%20not%20big%20so%20it%20is%20suitable%20for%20advanced%20offline%20analysis.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%E2%80%99s%20first%20explore%20this%20data%20set.%20If%20we%20switch%20to%20Chart%20pane%2C%20we%20will%20see%20quick%20visualization%20of%20data%20set%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JovanPop_3-1591919436359.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198270i582E6B04D4B2CA6B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22JovanPop_3-1591919436359.png%22%20alt%3D%22JovanPop_3-1591919436359.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20have%20set%20DATE_REP%20as%20category%20column%20and%20I%20see%20trend%20analysis%20of%20reported%20COVID%20cases%20in%20Serbia.%20By%20looking%20at%20this%20chart%2C%20we%20can%20see%20that%20the%20peek%20is%20somewhere%20between%2015%3CSUP%3Eth%3C%2FSUP%3E%20and%2020%3CSUP%3Eth%3C%2FSUP%3E%20April%2C%20and%20that%20distribution%20might%20be%20something%20like%20-ERR%3AREF-NOT-FOUND-Chi-squared%2C%20-ERR%3AREF-NOT-FOUND-Poisson%2C%20or%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChi-squared_distribution%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGamma%3C%2FA%3E%20distribution.%20This%20is%20important%20information%20because%20I%20can%20leverage%20this%20information%20in%20my%20offline%20ML%20model%20to%20test%20what%20distribution%20is%20the%20best%20fit%20for%20this%20data%20set.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-34371796%22%20id%3D%22toc-hId-34371796%22%20id%3D%22toc-hId-34371796%22%20id%3D%22toc-hId-34371796%22%3EConclusion%3C%2FH2%3E%0A%3CP%3ESynapse%20SQL%20endpoint%20and%20Synapse%20Studio%20in%20Azure%20Synapse%20Analytics%20are%20tools%20for%20easy%20data%20exploration%20that%20enable%20you%20to%20easily%20read%20the%20content%20of%20a%20file%20and%20do%20basic%20data%20exploration.%20In%20this%20example%2C%20we%20have%20seen%20how%20to%20leverage%20T-SQL%20language%20and%20charting%20features%20in%20Synapse%20Analytics%20to%20analyze%20distribution%20of%20reported%20COVID%20cases%20in%20Serbia.%20The%20similar%20analysis%20can%20be%20repeated%20on%20any%20other%20data%20set.%20You%20can%20also%20do%20more%20advanced%20analytic%20by%20leveraging%20the%20T-SQL%20features%20-%20see%20the%20article%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-synapse-analytics%2Fadvanced-analytics-of-covid-data-using-synapse-sql-endpoint-in%2Fba-p%2F1474748%22%20target%3D%22_blank%22%3EAdvanced%20analytics%20of%20COVID%20data%20using%20Synapse%20SQL%20endpoint%3C%2FA%3E%26nbsp%3Bfor%20more%20details.%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20more%20information%20about%20querying%20files%20in%20Azure%20Data%20Lakes%20Storage%20in%20this%20-ERR%3AREF-NOT-FOUND-article.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20try%20these%20queries%2C%20the%20scripts%20are%20below%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-sql%22%3E%3CCODE%3Eselect%20top%2010%20%20*%0Afrom%20openrowset(bulk%20'https%3A%2F%2Fpandemicdatalake.blob.core.windows.net%2Fpublic%2Fcurated%2Fcovid-19%2Fecdc_cases%2Flatest%2Fecdc_cases.parquet'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20format%3D'parquet')%20as%20a%0A%0Aselect%20countries_and_territories%2C%20geo_id%0Afrom%20openrowset(bulk%20'https%3A%2F%2Fpandemicdatalake.blob.core.windows.net%2Fpublic%2Fcurated%2Fcovid-19%2Fecdc_cases%2Flatest%2Fecdc_cases.parquet'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20format%3D'parquet')%20as%20a%0Awhere%20countries_and_territories%20like%20'%25serbia%25'%0A%0Aselect%20DATE_REP%2C%20CASES%0Afrom%20openrowset(bulk%20'https%3A%2F%2Fpandemicdatalake.blob.core.windows.net%2Fpublic%2Fcurated%2Fcovid-19%2Fecdc_cases%2Flatest%2Fecdc_cases.parquet'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20format%3D'parquet')%20as%20a%0Awhere%20geo_id%20%3D%20'RS'%0Aorder%20by%20date_rep%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1457836%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20article%20you%20will%20see%20how%20you%20can%20Azure%20Synapse%20Analytics%20solution%20help%20you%20to%20analyze%20the%20number%20of%20COVID%20cases%20using%20T-SQL%20language.%20The%20data%20set%20is%20placed%20on%20Azure%20storage%20and%20formatted%20as%20parquet.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1457836%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESynapse%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20Studio%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1573828%22%20slang%3D%22en-US%22%3ERe%3A%20How%20Azure%20Synapse%20Analytics%20helps%20you%20analyze%20COVID%20data%20with%20Synapse%20SQL%20serverless%20endpoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1573828%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F296874%22%20target%3D%22_blank%22%3E%40JovanPop%3C%2FA%3E%26nbsp%3B%20writing%20this%20up!%3CBR%20%2F%3EIs%20there%20a%20way%20to%20land%20the%20results%20of%20the%20SQL%20onDemand%20query%20in%20a%20SQL%20Pools%20table%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577586%22%20slang%3D%22en-US%22%3ERe%3A%20How%20Azure%20Synapse%20Analytics%20helps%20you%20analyze%20COVID%20data%20with%20Synapse%20SQL%20serverless%20endpoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577586%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F75190%22%20target%3D%22_blank%22%3E%40Ralph%20Kemperdick%3C%2FA%3E%26nbsp%3B%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECurrently%20you%20need%20to%20use%20some%20external%20app%2Fsystem%20like%20ADF%2Fsynapse%20pipeline%2C%20Spark%2FSQL%20database%20that%20can%20do%20cross-db%20query%20and%20ETL%20data%20from%20the%20result%20of%20on-demand%20query%20into%20the%20pool%20table.%3C%2FP%3E%0A%3CP%3EAs%20an%20alternative%20you%20can%20use%20CETAS%20on%20sql-on%20demand%20to%20run%20a%20SQL%20query%20and%20store%20it%20on%20external%20storage%2C%20and%20then%20use%20SQL%20pool%20external%20table%20to%20read%20this%20data%20and%20load%20it%20in%20database%20table.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Azure Synapse Analytics is a limitless data analytics service that enables you to analyze data on Azure DataLake storage. It provides managed Apache Spark and T-SQL engines (provisioned and serverless) for analyzing data. 

In this article, you will see how you can analyze the distribution of COVID cases reported in Serbia (Europe) using Synapse SQL endpoint in Synapse Analytics. Synapse SQL engine is the perfect choice for ad-hoc data analytics for the data analysts with T-SQL skills. The data set is placed on Azure storage and formatted as parquet.

 

Prerequisite

To try this sample, you need to have Azure Synapse Analytics workspace. If you don’t have one you can easily deploy it using Azure portal or this Deployment template. Workspace automatically deploys one serverless Synapse SQL endpoint that is everything we need for this kind of analysis. With the workspace you are also getting easy-to-use Web UI called Synapse Studio that enables you to start analyzing the files directly from your browser.

NOTE: You need Synapse SQL serverless (on-demand) query endpoint to execute the code in this article. The functionalities used in this article are still not available in provisioned  endpoint.

 

COVID data set

In this sample is used the latest available public data on geographic distribution of COVID-19 cases worldwide from the European Center for Disease Prevention and Control (ECDC). Each row/entry contains the number of new cases reported per day and per country. For more information about this dataset, see here. Data set is updated on daily basis and placed as a part of Azure Open Dataset.

 

OPENROWSET function

Synapse SQL endpoint in Synapse Analytics enables you to use OPENROWSET T-SQL function to analyze data in Azure Data Lake storage. This is easy to use function where you just need to provide URL of some file on Azure storage and you will get the content of the file. Example of OPENROWSET function that reads the content of a parquet file placed on Azure storage is shown in the following example:

 

select *
from openrowset(bulk 'https://****.blob.core.windows.net/.../cases.parquet',
                format='parquet') as cases

 

If you provide a file URL after the bulk keyword and specify that you are using parquet format, you will get the content of that parquet file.

 

Analyzing COVID dataset

Probably the easiest tool that you can use to analyze the file is Synapse Studio – Web UI where you can write a T-SQL query and see the results in browser.

We can begin analysis by exploring the columns in data set on first 10 records:

JovanPop_0-1591919436320.png

Here I can see that some of the columns interesting for analysis are DATE_REP and CASES. I would like to analyze number of cases reported in Serbia, so I would need to filter the results using GEO_ID column.

I’m not sure what is geo_id value for Serbia, so I will find all distinct countries and geo_id values where country is something like Serbia:

JovanPop_1-1591919436335.png

Here I can find that the value that I should use for filtering is ‘RS’. Now I can use this value to filter the records that represent reported cases in ‘Serbia’ and get date when the case is reported and number of cases. In addition, I will sort these values by date reported:

JovanPop_2-1591919436346.png

We can easily export data set with the number of cases reported in Serbia as CSV, Excel, or some other file type, so we can apply some offline client-side machine learning using Python or R or some other offline tool. In this case data set is not big so it is suitable for advanced offline analysis.

 

Let’s first explore this data set. If we switch to Chart pane, we will see quick visualization of data set:

JovanPop_3-1591919436359.png

I have set DATE_REP as category column and I see trend analysis of reported COVID cases in Serbia. By looking at this chart, we can see that the peek is somewhere between 15th and 20th April, and that distribution might be something like Chi-squared, Poisson, or Gamma distribution. This is important information because I can leverage this information in my offline ML model to test what distribution is the best fit for this data set.

Conclusion

Synapse SQL endpoint and Synapse Studio in Azure Synapse Analytics are tools for easy data exploration that enable you to easily read the content of a file and do basic data exploration. In this example, we have seen how to leverage T-SQL language and charting features in Synapse Analytics to analyze distribution of reported COVID cases in Serbia. The similar analysis can be repeated on any other data set. You can also do more advanced analytic by leveraging the T-SQL features - see the article Advanced analytics of COVID data using Synapse SQL endpoint for more details.

You can find more information about querying files in Azure Data Lakes Storage in this article.

 

If you want to try these queries, the scripts are below:

select top 10  *
from openrowset(bulk 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.parquet',
                format='parquet') as a

select countries_and_territories, geo_id
from openrowset(bulk 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.parquet',
                format='parquet') as a
where countries_and_territories like '%serbia%'

select DATE_REP, CASES
from openrowset(bulk 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.parquet',
                format='parquet') as a
where geo_id = 'RS'
order by date_rep

 

2 Comments

Thanks @JovanPop  writing this up!
Is there a way to land the results of the SQL onDemand query in a SQL Pools table?

Microsoft

Hi @Ralph Kemperdick , 

Currently you need to use some external app/system like ADF/synapse pipeline, Spark/SQL database that can do cross-db query and ETL data from the result of on-demand query into the pool table.

As an alternative you can use CETAS on sql-on demand to run a SQL query and store it on external storage, and then use SQL pool external table to read this data and load it in database table.