Alex
Alex

Reputation: 1

Connecting Atoti to Oracle database

I want to make a connection to an Oracle database and I have found the following method in the docs: https://docs.atoti.io/latest/lib/atoti.store.html?highlight=jdbc#atoti.store.Store.load_sql

I call this method with something like this: my_store.load_sql(url, query, username=my_username, password=my_password)
And I use a URL with this form: 'jdbc:XX.XX.XX.XX:YYYY/ZZZZ', but I get the following error:

ValueError: No driver provided and cannot infer it from URL.

I also created this config with a path to a jdbc jar file in my SQL Developer folder, but the error persists:

my_jdbc = 'ojdbc8.jar'
tt.config.create_config(extra_jars = my_jdbc)

Does anyone know how I can solve it or have any example of loading stores from an Oracle database?

Thanks in advance.

Upvotes: 0

Views: 272

Answers (1)

Daniel Taylor
Daniel Taylor

Reputation: 1

The atoti-sql plugin comes with the Oracle driver so you don't need to add an extra jar to the config. However you do need to pass the driver when calling my_store.load_sql. These can be found in the atoti_sql.drivers module. In your case since you are using an Oracle database, the correct code should be something like:

my_store.load_sql(
  url,
  query,
  username=username,
  password=mypassword,
  driver=atoti_sql.drivers.ORACLE
)

Upvotes: 0

Related Questions