简体   繁体   English

Synapse SQL 按需第一行跳过的不仅仅是第一行

[英]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.

相关问题 用于计算从月的第1天到指定日期的差异的SQL - SQL to calculate difference from 1st day of Month to Date specified Azure Synapse Analytics 监视器行组跳过 - Azure Synapse Analytics monitor rowgroup skipping Azure SQL DW 超大规模和 Azure Synapse 的路线图 - Roadmap for Azure SQL DW Hyperscale and Azure Synapse 在 Azure SQL 数据仓库(突触)中指定 datetime2 格式 - Specify datetime2 format in Azure SQL data warehouse (synapse) 如何在 Azure Synapse Analytics(原 SQL DW)中附加备份 - How to attach backup in Azure Synapse Analytics (formerly SQL DW) Azure Synapse 无服务器 SQL 池错误:'DISTRIBUTION' 附近的语法不正确 - Azure Synapse Serverless SQL Pool Error: Incorrect syntax near 'DISTRIBUTION' 在 Azure Synapse 无服务器池中创建外部表时如何确保选择第一行 - How to Ensure First Row is Selected when Creating an External Table in Azure Synapse Serverless Pool 可以使用什么工具将 SQL Server DB/DW 迁移到 Azure Synapse(以前称为 Azure SQL DW)? - What tool can be used to MIGRATE SQL Server DB/DW to Azure Synapse (formerly Azure SQL DW)? Azure Synapse Serverless SQL 池无法连接但可以连接到专用 SQL 池? - Azure Synapse Serverless SQL Pool Unable to Connect BUT Can connect to Dedicated SQL Pool? 从不同租户中的 Az Synapse(专用 SQL 池)访问跨租户存储帐户(受防火墙保护) - Access cross tenant Storage Account (firewall protected) from Az Synapse (dedicated SQL pool) in a different tenant
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM