Skip to content

Commit 9670cd8

Browse files
committed
Dependencies: Migrate from crate[sqlalchemy] to sqlalchemy-cratedb
The CrateDB SQLAlchemy dialect needs more love, so it was separated from the DBAPI HTTP driver.
1 parent 0fb2976 commit 9670cd8

File tree

16 files changed

+28
-34
lines changed

16 files changed

+28
-34
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
apache-superset
2-
crate[sqlalchemy]==0.35.2
2+
sqlalchemy-cratedb>=0.36.1,<1

by-dataframe/dask/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ database table in a single operation. It can be used like this:
2222
# DBURI = "crate://crate@localhost:4200/"
2323

2424
import sqlalchemy as sa
25-
from crate.client.sqlalchemy.support import insert_bulk
25+
from sqlalchemy_cratedb.support import insert_bulk
2626

2727
ddf.to_sql(
2828
"testdrive",

by-dataframe/dask/insert_dask.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
=====
99
::
1010
11-
pip install --upgrade click colorlog 'crate[sqlalchemy]' pandas
11+
pip install --upgrade click colorlog pandas sqlalchemy-cratedb
1212
1313
Synopsis
1414
========
@@ -21,11 +21,10 @@
2121

2222
import click
2323
import dask.dataframe as dd
24-
import sqlalchemy as sa
25-
from crate.client.sqlalchemy.support import insert_bulk
2624
from dask.diagnostics import ProgressBar
2725
from pueblo.testing.pandas import makeTimeDataFrame
2826
from pueblo.util.logging import setup_logging
27+
from sqlalchemy_cratedb.support import insert_bulk
2928

3029
logger = logging.getLogger(__name__)
3130

by-dataframe/dask/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
click<9
22
colorlog<7
3-
crate[sqlalchemy]
43
dask[dataframe]>=2024.4.1 # Python 3.11.9 breaks previous Dask
54
distributed>=2024.4.1 # Python 3.11.9 breaks previous Dask
65
pueblo>=0.0.7
6+
sqlalchemy-cratedb>=0.36.1,<1

by-dataframe/pandas/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ database table in a single operation. It can be used like this:
2222
# DBURI = "crate://crate@localhost:4200/"
2323

2424
import sqlalchemy as sa
25-
from crate.client.sqlalchemy.support import insert_bulk
25+
from sqlalchemy_cratedb.support import insert_bulk
2626

2727
engine = sa.create_engine(DBURI, **kwargs)
2828
df.to_sql(

by-dataframe/pandas/insert_pandas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
=====
1717
::
1818
19-
pip install --upgrade click colorlog 'crate[sqlalchemy]' pandas
19+
pip install --upgrade click colorlog pandas sqlalchemy-cratedb
2020
2121
2222
Synopsis
@@ -50,9 +50,9 @@
5050

5151
import click
5252
import sqlalchemy as sa
53-
from crate.client.sqlalchemy.support import insert_bulk
5453
from pueblo.testing.pandas import makeTimeDataFrame
5554
from pueblo.util.logging import setup_logging
55+
from sqlalchemy_cratedb.support import insert_bulk
5656

5757
logger = logging.getLogger(__name__)
5858

by-dataframe/pandas/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
click<9
22
colorlog<7
3-
crate[sqlalchemy]
4-
pandas<2.3
3+
pandas==2.2.*
54
pueblo>=0.0.7
5+
sqlalchemy-cratedb>=0.36.1,<1

by-dataframe/polars/read_sqlalchemy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"""
2-
Install the dependencies with:
2+
Install the dependencies to run this program::
33
4-
```
5-
$ pip install crate[sqlalchemy] polars
6-
```
4+
pip install --upgrade polars sqlalchemy-cratedb
75
"""
86

97
import polars

by-dataframe/polars/write_sqlalchemy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
Import a parquet file into CrateDB using polars + sqlalchemy
33
4-
Install the dependencies with to run this script:
4+
Install the dependencies to run this program::
55
6-
`$ pip install polars pandas crate[sqlalchemy] pyarrow`
6+
pip install --upgrade pandas polars pyarrow sqlalchemy-cratedb
77
"""
88

99
import polars

by-language/python-sqlalchemy/insert_efficient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
=====
1515
::
1616
17-
pip install --upgrade 'crate[sqlalchemy]'
17+
pip install --upgrade sqlalchemy-cratedb
1818
1919
2020
Synopsis
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Real.
2-
crate[sqlalchemy]
3-
mlflow-cratedb==2.11.3
2+
cratedb-toolkit>=0.0.13,<0.1
3+
mlflow-cratedb==2.13.2
44
plotly<5.23
55
pycaret[models,parallel,test]==3.3.2
66
pydantic<2
77
python-dotenv<2
88
sqlalchemy==2.*
9+
sqlalchemy-cratedb>=0.36.1,<1
910

1011
# Development.
1112
# mlflow-cratedb @ git+https://github.com/crate-workbench/mlflow-cratedb.git@main

topic/machine-learning/llm-langchain/requirements.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# Real.
22
crash
3-
crate[sqlalchemy]==0.35.2
4-
cratedb-toolkit==0.0.12
5-
6-
# langchain[cratedb,openai]==0.0.354
7-
# langchain-community==0.0.8
8-
3+
cratedb-toolkit>=0.0.13,<0.1
94
google-cloud-aiplatform<2
105
langchain-google-vertexai<2
116
langchain-openai<0.2
@@ -17,6 +12,7 @@ python-dotenv<2
1712
requests<3
1813
requests-cache<2
1914
sqlalchemy==2.*
15+
sqlalchemy-cratedb>=0.36.1,<1
2016
unstructured<0.15
2117

2218
# Development.

topic/machine-learning/mlops-mlflow/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Real.
22
dask>=2024.4.1 # Python 3.11.9 breaks previous Dask
33
distributed>=2024.4.1 # Python 3.11.9 breaks previous Dask
4-
mlflow-cratedb==2.11.3
4+
mlflow-cratedb==2.13.2
55
pydantic<3
66
salesforce-merlion>=2,<3
77
sqlalchemy==2.*

topic/timeseries/dask-weather-data-import.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"outputs": [],
6868
"source": [
69-
"!pip install dask 'pandas==2.0.0' 'crate[sqlalchemy]' 'cratedb-toolkit==0.0.10' 'pueblo>=0.0.7' kaggle"
69+
"!pip install --upgrade 'cratedb-toolkit' 'dask' 'kaggle' 'pandas==2.0.*' 'pueblo>=0.0.7' 'sqlalchemy-cratedb'"
7070
]
7171
},
7272
{
@@ -531,7 +531,7 @@
531531
"source": [
532532
"import os\n",
533533
"import sqlalchemy as sa\n",
534-
"from crate.client.sqlalchemy.support import insert_bulk\n",
534+
"from sqlalchemy_cratedb.support import insert_bulk\n",
535535
"\n",
536536
"# Define database address when using CrateDB Cloud.\n",
537537
"# Please find these settings on your cluster overview page.\n",

topic/timeseries/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
crate[sqlalchemy]==0.35.2
2-
cratedb-toolkit[datasets]==0.0.12
1+
cratedb-toolkit[datasets]==0.0.13
32
refinitiv-data<1.7
4-
pandas<2
3+
pandas==1.*
54
pycaret==3.3.2
65
pydantic<2
7-
sqlalchemy<2
6+
sqlalchemy==1.*
7+
sqlalchemy-cratedb>=0.36.1,<1

topic/timeseries/timeseries-queries-and-visualization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"metadata": {},
6868
"outputs": [],
6969
"source": [
70-
"#!pip install 'crate[sqlalchemy]' 'pandas>=2' plotly kaleido"
70+
"#!pip install --upgrade kaleido 'pandas>=2' plotly sqlalchemy-cratedb"
7171
]
7272
},
7373
{

0 commit comments

Comments
 (0)