Raghav Vashisht
Raghav Vashisht

Reputation: 81

Recreate a store in atoti with the same name without restarting the kernel

Description When calling twice the following code:

store = session.read_pandas(dataframe, 'my_store', keys=['id'])

We get the following exception:

AtotiJavaException: A store with the name my_store already exists! 
If you want to recreate this store with a different CSV, you will have to re-create the session.

I am looking for a way to recreate such a store (overriding the previous one) without having to restart the kernel and re-run all cells.

Upvotes: 1

Views: 168

Answers (1)

Raghav Vashisht
Raghav Vashisht

Reputation: 81

Disclaimer: I am a Data Scientist at atoti.

One quick fix I found for the above problem is: Instead of restarting the whole kernel, you can simply recreate the session i.e. run the below cell again, and then you can create the store with the same CSV file. (The step you usually do after importing atoti.)

# Tell atoti to load the database containing the UI dashboards
config = create_config(metadata_db="./metadata.db")

session = atoti.create_session(config=config)

Upvotes: 0

Related Questions