MCPcopy Index your code
hub / github.com/dask/dask / test_read_sql

Function test_read_sql

dask/dataframe/io/tests/test_sql.py:461–473  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

459
460
461def test_read_sql(db):
462 from sqlalchemy import sql
463
464 s = sql.select(sql.column("number"), sql.column("name")).select_from(
465 sql.table("test")
466 )
467 out = read_sql(s, db, npartitions=2, index_col="number")
468 assert_eq(out, df[["name"]])
469
470 data = read_sql_table("test", db, npartitions=2, index_col="number").compute()
471 assert (data.name == df.name).all()
472 assert data.index.name == "number"
473 assert_eq(data, df)
474
475
476@contextmanager

Callers

nothing calls this directly

Calls 5

read_sqlFunction · 0.90
assert_eqFunction · 0.90
read_sql_tableFunction · 0.90
computeMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…