atoti.config.user_content_storage_config module#

class atoti.UserContentStorageConfig#

The advanced configuration for the user content storage.


JDBC backed user content storage requires the atoti-sql plugin.


>>> user_content_storage_config = tt.UserContentStorageConfig(
...     url="mysql://localhost:7777/example?user=username&password=passwd"
... )

For drivers not embedded with atoti-sql, extra JARs can be passed:

>>> import glob
>>> user_content_storage = tt.UserContentStorageConfig(
...     url="jdbc:bigquery://;ProjectId=PROJECT_ID;OAuthType=0;OAuthServiceAcctEmail=EMAIL_OF_SERVICEACCOUNT;OAuthPvtKeyPath=path/to/json/keys;",
...     driver="com.simba.googlebigquery.jdbc42.Driver",
... )
>>> extra_jars = glob.glob("./odbc_jdbc_drivers/*.jar")
driver: Optional[str] = None#

The JDBC driver used to load the data.

If None, the driver is inferred from the URL. Drivers can be found in the atoti_sql.drivers module.

url: str#

The JDBC connection URL of the database.

The jdbc: prefix is optional but the database specific part (such as h2: or mysql:) is mandatory. For instance:

  • h2:file:/home/user/database/file/path;USER=username;PASSWORD=passwd

  • mysql://localhost:7777/example?user=username&password=passwd

  • postgresql://postgresql.db.server:5430/example?user=username&password=passwd

More examples can be found here.