man-group / ArcticDB

ArcticDB is a high performance, serverless DataFrame database built for the Python Data Science ecosystem.
http://arcticdb.io
Other
1.51k stars 93 forks source link

create_if_missing in coda #1984

Closed c-vision closed 2 weeks ago

c-vision commented 2 weeks ago

Describe the bug

I installed arcticdb by

$ conda install -c conda-forge arcticdb

in my MacOS with Python 3.11.3. I obtain an error using create_if_missing parameter in get_library funcion.

lib = arctic.get_library("financial_ratios", create_if_missing=True)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: Arctic.get_library() got an unexpected keyword argument 'create_if_missing'

Steps/Code to Reproduce

import os import io import time import requests import pandas as pd import arcticdb as adb

arctic = adb.Arctic("lmdb://fundamentals")

arctic.create_library('financial_ratios')

lib = arctic.get_library("financial_ratios", create_if_missing=True)

Expected Results

create_if_missing should work as expected

OS, Python Version and ArcticDB Version

Python: 3.11.3 (main, Apr 19 2023, 18:51:09) [Clang 14.0.6 ] OS: macOS-10.16-x86_64-i386-64bit ArcticDB: 1.2.1

Backend storage used

No response

Additional Context

No response

poodlewars commented 2 weeks ago

Thanks @c-vision . Your ArcticDB version, 1.2.1, predates the introduction of the create_if_missing option. You should upgrade to the latest version (5.0.0).