SHOW LOAD.
NOTICESyntax
- You can load data into tables only as a user who has the INSERT privilege on those tables. If you do not have the INSERT privilege, follow the instructions provided in GRANT to grant the INSERT privilege to the user that you use to connect to your cluster.
- When Spark Load is used to load data into a table, the bucketing column of the table cannot be of DATE, DATETIME, or DECIMAL type.
text
SHOW RESOURCES command.
4.resource_properties
When you have a temporary need, such as modifying the Spark and HDFS configurations, you can set the parameters here, which takes effect only in this specific spark loading job and not to affect the existing configurations in the cluster.
5.opt_properties
Used to specify some special parameters.
Syntax:
Examples
-
Import a batch of data from HDFS, and specify the timeout time and filtering ratio. Use the name my_ spark resources for spark.
Where hdfs_host is the host of namenode, hdfs_port is fs.defaultfs port (default 9000)
-
Import a batch of “negative” data from HDFS, specify the separator as comma, use the wildcard * to specify all files in the directory, and specify the temporary parameters of spark resources.
-
Import a batch of data from HDFS, specify the partition, and do some conversion on the columns of the imported file, as follows:
text
-
Extract the partition field in the file path
If necessary, the partitioned fields in the file path will be resolved according to the field types defined in the table, similar to the function of Partition Discovery in Spark
hdfs://hdfs_host:hdfs_port/user/starRocks/data/input/dir/city=beijingThe directory includes the following files:[hdfs://hdfs_host:hdfs_port/user/starRocks/data/input/dir/city=beijing/utc_date=2019-06-26/0000.csv, hdfs://hdfs_host:hdfs_port/user/starRocks/data/input/dir/city=beijing/utc_date=2019-06-26/0001.csv, ...]The city and utc_date field in the file path are extracted -
Filter the data to be imported. Only columns with k1 value greater than 10 can be imported.
-
Import from the hive external table and convert the uuid column in the source table to the bitmap type through the global dictionary.