question

ValterPrykri-7717 avatar image
0 Votes"
ValterPrykri-7717 asked SamaraSoucy-MSFT commented

Why does Synapse On-Demand return same row counts when running queries with UNION ALL?

In the second query, FIRSTROW is set to 2. Running these queries separately will return different counts, but running them in an UNION ALL query, the both values will be the same.


 SELECT
     count(*)
 FROM
     OPENROWSET(
         BULK 'https://teststorage.dfs.core.windows.net/data/test.csv',
         FORMAT = 'CSV',
         PARSER_VERSION='2.0',
         FIRSTROW = 1,
         FIELDTERMINATOR = ';' ) as res
    
 UNION ALL 
    
 SELECT
     count(*)
 FROM
     OPENROWSET(
         BULK 'https://teststorage.dfs.core.windows.net/data/test.csv',
         FORMAT = 'CSV',
         PARSER_VERSION='2.0',
         FIRSTROW = 2,
         FIELDTERMINATOR = ';') as res
azure-synapse-analytics
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there anything in particular about the test file that could be tripping up the parser? I haven't been able to duplicate your issue:
98983-image.png


1 Vote 1 ·
image.png (115.1 KiB)

Not sure, happens with every file I have:

99042-image.png


0 Votes 0 ·
image.png (26.6 KiB)

Okay, I'm going to reach out to the product team to see if they have any suggestions on what could be wrong. It can take a couple days to get a response- I will let you know if they know, or if we need to escalate to a support case so that we can look into your specific instance.

1 Vote 1 ·
Show more comments

0 Answers