Help Center > > User Guide> MRS Cluster Component Operation Guide> Using Presto> Using Presto to Dump Data in DLF

Using Presto to Dump Data in DLF

Updated at: Apr 28, 2020 GMT+08:00

Prerequisites

Creating a Data Connection of the MRS PrestoSQL Type in DLF

  1. In the left navigation pane of the DLF console, choose Connection > Manage Connection.
  2. In the upper right corner of the page, click Create Data Connection.
  3. Set parameters according to Table 1.

    Table 1 Parameters for creating a data connection

    Parameter

    Description

    Data Connection Type

    Select MRS PrestoSQL.

    Data Connection Name

    Name of the data connection to be created, which contains 1 to 100 characters and consists of only letters, digits, underscores (_), and hyphens (-)

    Cluster Name

    Name of the MRS cluster to which Presto belongs

  4. Click Test to test connectivity of the data connection. If the test fails, the data connection fails to be created.
  5. Click OK.

Creating and Executing SQL Scripts on the DLF Script Development Page

In this scenario, the query results dumped to OBS can be retained for a maximum of 10,000 times. If the number of query times exceeds 10,000, the historical query results are automatically aged based on the query time sequence. To prevent data loss, exercise caution when performing this operation.

  1. In the left navigation pane of the DLF console, choose Development > Develop Script.
  2. In the right pane, click Create SQL Script and select Presto.
  3. In the upper right part of the editor, select the connection created in Creating a Data Connection of the MRS PrestoSQL Type in DLF from the Connection drop-down list.
  4. In the upper right part of the editor, select the schema from the Schema drop-down list box.
  5. Enter one or more SQL statements in the editor. If you need to run a specified SQL statement separately, select the SQL statement before running it.
  6. In the upper part of the editor, click Execute. After executing the SQL statement, view the execution history and result of the script in the lower part of the editor.

    • Administrator operations are not supported. That is, all commands that can be executed only after the set role admin command is executed are not supported.
    • Each statement is executed independently. Therefore, the statement with context settings (for example, use) does not take effect after being executed.
    • When Presto authorization is enabled, the default permissions of various users are as follows:
      • All users have the read/write permissions on the mrs_reserved database in Hive by default.
      • All IAM users with the MRS CommonOperations, MRS FullAccess, MRS Administrator, and Tenant Administrator policies have read/write permission on the default database in Hive, and users with the MRS ReadOnlyAccess policy have read-only permission on the database.
      • User admin of the cluster and IAM users with the MRS FullAccess, MRS Administrator, and Tenant Administrator policies have the admin role permission on the Hive database.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel