atoti.config.user_content_storage module¶
- class atoti.config.user_content_storage.UserContentStorageConfig(url, driver=None)¶
The advanced configuration for the user content storage.
Note
JDBC backed user content storage requires the
atoti-sql
plugin.Example
>>> config = { ... "user_content_storage": { ... "url": "mysql://localhost:7777/example?user=username&password=passwd" ... } ... }
For drivers not embedded with
atoti-sql
, extra JARs can be passed:>>> import glob >>> config = { ... "user_content_storage": { ... "url": "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;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 theatoti_sql.drivers
module.
- url: str¶
The JDBC connection URL of the database.
The
jdbc:
prefix is optional but the database specific part (such ash2:
ormysql:
) 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.