Если 2016+, вы можете загрузить данные JSON.
Если <2016, я полагаю, есть также опция XML </p>
Загрузка занимает пару секунд, а синтаксический анализ JSON занимает менее 4 секунд (в зависимости от на вашем оборудовании).
Пример
exec master..xp_cmdshell 'powershell.exe Invoke-WebRequest "https://opendata.ecdc.europa.eu/covid19/casedistribution/json/" -OutFile "c:\working\covid.json"',no_output
Declare @json varchar(max);
Select @json = BulkColumn FROM OPENROWSET(BULK 'c:\working\covid.json', SINGLE_BLOB) x;
;with cte as (
Select [DataDate] = try_convert(date,DateRep,105)
,[CountryCd]= try_convert(varchar(50),countryterritoryCode)
,[Country] = try_convert(varchar(150),countriesAndTerritories)
,[Cases] = try_convert(int ,cases)
,[Deaths] = try_convert(int ,deaths)
,[Pop] = try_convert(int ,[popData2018])
,rtc = sum(try_convert(int ,cases)) over (partition by countryterritoryCode order by try_convert(date,DateRep,105))
,rtd = sum(try_convert(int ,deaths)) over (partition by countryterritoryCode order by try_convert(date,DateRep,105))
From (
Select Idx= B.[Key]
,C.*
From OpenJSON(@json ) A
Cross Apply OpenJson(A.value) B
Cross Apply OpenJson(B.value) C
) src
Pivot (max(value) for [Key] in ( [dateRep],[cases],[deaths],[countriesAndTerritories],[geoId],[countryterritoryCode],[popData2018] ) ) pvt
)
Select DataDate
,CountryCd
,Country
,Cases = format(Cases,'#,###')
,Deaths= format(Deaths,'#,###')
,Pop = format(Pop/1000000.0,'#,##0.0')+'MM'
,RTC = format(RTC,'#,###')
,RTD = format(RTD,'#,###')
,Mort = format((rtd*100.0) / nullif(rtc,0),'##0.00')+'%'
,PctPop= format((cases*100.0) / nullif(Pop,0),'##0.0000')+'%'
From cte
Where DataDate='2020-04-11'
Order By try_convert(money,RTC) desc
Возвращает