[英]Synapse SQL on-demand firstrow skipping more than just the 1st row
Hi have noticed that when you set firstrow = 2 the result set has misisng rows.嗨,您注意到当您设置 firstrow = 2 时,结果集缺少行。
This can be easily noticed:这很容易被注意到:
The query below (querying a public data source) returns 41165. Setting firstrow = 3 return 41119 (my expectation is that it should only have 1 row less).下面的查询(查询公共数据源)返回 41165。设置 firstrow = 3 返回 41119(我的期望是它应该只少 1 行)。
Interestingly, changing the query to select count(*) has expected behaviour (ie rowcount will decrease by 1 if firstrow is incremented).有趣的是,将查询更改为 select count(*) 具有预期的行为(即,如果 firstrow 增加,rowcount 将减少 1)。
I noticed the issues after troubleshooting a sum funtion which returned less than i was expecting.在对返回值低于我预期的 sum 函数进行故障排除后,我注意到了这些问题。
select COUNT(c1)
from openrowset(
bulk 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.csv',
format = 'csv',
parser_version = '2.0',
firstrow = 2) as rows
Thank you for raising this, we are aware of this issue.感谢您提出这个问题,我们知道这个问题。 Fix for this will land soon.
修复此问题将很快登陆。
In the meantime, you can use parser_version = '1.0'
.同时,您可以使用
parser_version = '1.0'
。
Try using this query:尝试使用此查询:
select COUNT(date_rep)
from openrowset(
bulk 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/ecdc_cases/latest/ecdc_cases.csv',
format = 'csv',
parser_version = '1.0',
firstrow = 3
) WITH (
[date_rep] datetime2,
[day] smallint,
[month] smallint,
[year] smallint,
[cases] smallint,
[deaths] smallint,
[countries_and_territories] VARCHAR (100)
) AS [r]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.