Review the following requirements to export query results.
Ask the admin user to grant you the
EXPORT_QUERY_RESULTS
privilege.
Run the following command:
mysql>GRANT EXPORT_QUERY_RESULTS ON database_name.* TO 'user_name'@'%';
To check if you have the
EXPORT_QUERY_RESULTS
privilege, run the SHOW
GRANTS SQL statement.
You do not require any additional privileges to use Pre-Authenticated Requests (PAR). However, when you create them to export query results, do the following:
For Pre-Authenticated Request Target, select or .
For Access Type, select Permit object reads and writes.
Select Enable Object Listing.
See Object Storage Pre-Authenticated Requests from the HeatWave on OCI Service Guide to learn more.
For resource principals on HeatWave on OCI, modify the policy that grants the dynamic group's resources access to buckets and their contents in a specific compartment. For more information, refer to the "Defining a Policy for Exporting Query Results to Object Storage" section in Configuring a Tenancy for Resource Principal Data Loading in the HeatWave on OCI Service Guide.
For HeatWave on AWS, you need the Lakehouse role to access Object Storage. This role is required even when Lakehouse is disabled. For more information, see Configure Policies and Roles to Access Resources.
Depending on the type of file you want to create, review the appropriate section: