{"action":"created","issue":{"url":"https://api.github.com/repos/dask/dask/issues/3961","repository_url":"https://api.github.com/repos/dask/dask","labels_url":"https://api.github.com/repos/dask/dask/issues/3961/labels{/name}","comments_url":"https://api.github.com/repos/dask/dask/issues/3961/comments","events_url":"https://api.github.com/repos/dask/dask/issues/3961/events","html_url":"https://github.com/dask/dask/issues/3961","id":358039392,"node_id":"MDU6SXNzdWUzNTgwMzkzOTI=","number":3961,"title":"read_sql_table fails on large tables","user":{"login":"spleiner","id":26770312,"node_id":"MDQ6VXNlcjI2NzcwMzEy","avatar_url":"https://avatars0.githubusercontent.com/u/26770312?v=4","gravatar_id":"","url":"https://api.github.com/users/spleiner","html_url":"https://github.com/spleiner","followers_url":"https://api.github.com/users/spleiner/followers","following_url":"https://api.github.com/users/spleiner/following{/other_user}","gists_url":"https://api.github.com/users/spleiner/gists{/gist_id}","starred_url":"https://api.github.com/users/spleiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spleiner/subscriptions","organizations_url":"https://api.github.com/users/spleiner/orgs","repos_url":"https://api.github.com/users/spleiner/repos","events_url":"https://api.github.com/users/spleiner/events{/privacy}","received_events_url":"https://api.github.com/users/spleiner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-09-07T12:01:12Z","updated_at":"2018-10-23T13:32:52Z","closed_at":null,"author_association":"NONE","body":"I am trying to read a table on a SQL Server containing  approximately 3 billion rows with the following code:\r\n\r\nimport dask.dataframe as dd\r\ndf = dd.read_sql_table(\"TABLE\",connectionstring,\"INDEX\")\r\n\r\nAfter a while I get the following error:\r\nDataError: (pyodbc.DataError) ('22003', '[22003] [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error converting expression to data type int. (8115) (SQLExecDirectW)') [SQL: 'SELECT count([TABLE].[TAB_KEY]) AS count_1 \\nFROM [TABLE]'] (Background on this error at: http://sqlalche.me/e/9h9h)\r\n\r\nWhen using another client to query the database with:\r\nSELECT COUNT(*) FROM TABLE\r\n\r\nI get the same Arithmetic overflow error converting expression to data type int. (8115)-error but when using:\r\n\r\nSELECT COUNT_BIG(*) FROM TABLE\r\n\r\nit works.\r\n\r\nIs there a way to make Dask use COUNT_BIG or some other workaround?\r\n\r\nPython: 3.6.6\r\nDask: 0.19.1"},"comment":{"url":"https://api.github.com/repos/dask/dask/issues/comments/432248195","html_url":"https://github.com/dask/dask/issues/3961#issuecomment-432248195","issue_url":"https://api.github.com/repos/dask/dask/issues/3961","id":432248195,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjI0ODE5NQ==","user":{"login":"martindurant","id":6042212,"node_id":"MDQ6VXNlcjYwNDIyMTI=","avatar_url":"https://avatars1.githubusercontent.com/u/6042212?v=4","gravatar_id":"","url":"https://api.github.com/users/martindurant","html_url":"https://github.com/martindurant","followers_url":"https://api.github.com/users/martindurant/followers","following_url":"https://api.github.com/users/martindurant/following{/other_user}","gists_url":"https://api.github.com/users/martindurant/gists{/gist_id}","starred_url":"https://api.github.com/users/martindurant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindurant/subscriptions","organizations_url":"https://api.github.com/users/martindurant/orgs","repos_url":"https://api.github.com/users/martindurant/repos","events_url":"https://api.github.com/users/martindurant/events{/privacy}","received_events_url":"https://api.github.com/users/martindurant/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T13:32:52Z","updated_at":"2018-10-23T13:32:52Z","author_association":"MEMBER","body":"Ah, but I think COUNT_BIG only exists for MS SQL server, and, apparently, is not the function returned by the SQLalchemy `count()` function. So maybe this should be posted as an issue to sqlalchemy? I do not immediately find any reference to the problem by searching."}}
{"actor":{"display_login":"martindurant"}}