Database privileges required for Auto Schema Conversion
To use Auto Schema Conversion, a database administrator must assign privileges to the users or service accounts to be specified for the source and target connections using the following commands or procedures:
Azure Delta Lake for Databricks - target only
GRANT CREATE ON SCHEMA <SCHEMANAME> TO <USERNAME>;
Azure Synapse - target only
USE <DATABASENAME>; EXEC sp_addrolemember 'db_owner', '<USERNAME>';
BigQuery - target only
Follow the instructions in BigQuery setup to assign roles or permissions to the service account to be specified in the target properties.
Cloud Spanner - target only
Grant the Cloud Spanner Database User or higher role (see Cloud Spanner Roles) for the database to the service account to be specified in the target properties.
MariaDB / MySQL - source
Create a user as described in MySQL / MariaDB setup.
Alternatively, assign the SELECT privilege:
GRANT SELECT ON *.* TO <USERNAME>@<HOSTNAME>;
MariaDB / MySQL - target
GRANT CREATE ON *.* TO <USERNAME>@<HOSTNAME>;
Oracle - source
Create a user as described in Create an Oracle user with LogMiner privileges. or Running the OJet setup script on Oracle.
Alternatively, assign the following privileges:
grant CREATE SESSION to <username>; grant SELECT ANY TABLE to <username>; grant SELECT ANY DICTIONARY to <username>;
Oracle - target
GRANT CREATE SESSION TO <USERNAME>; GRANT CREATE USER TO <USERNAME>; GRANT CREATE ANY TABLE TO <USERNAME>; GRANT CREATE ANY INDEX TO <USERNAME>; GRANT UNLIMITED TABLESPACE TO <USERNAME>;
PostgreSQL - source
Create a user as described in PostgreSQL setup.
Alternatively, assign the following privileges:
GRANT CONNECT ON DATABASE <DATABASENAME> TO <USERNAME>; GRANT SELECT ON <TABLENAMES> to <USERNAME>;
PostgreSQL - target
GRANT CONNECT ON DATABASE <DATABASENAME> TO <USERNAME>; GRANT CREATE ON <TABLENAMES> to <USERNAME>;
Snowflake - target only
GRANT USAGE ON <DATABASE | WAREHOUSE | SCHEMA | TABLE> TO ROLE <USERNAME>;
SQL Server - source
Create a user as described in SQL Server setup.
Alternatively, give the user the db_owner role:
USE <DATABASENAME>; EXEC sp_addrolemember 'db_owner', '<USERNAME>';
SQL Server - target
USE <DATABASENAME>; EXEC sp_addrolemember 'db_owner', '<USERNAME>';