DWS users can import data from external sources to a data warehouse cluster. This section describes how to import sample data from OBS to a data warehouse cluster. The sample data is generated based on the TPC-DS benchmark test.
/bin/bash setup.sh -ak <Access_Key_Id> -sk <Secret_Access_Key> -obs_location obs.otc.t-systems.com
If the following information is displayed, the setting is successful:
Obtain values of Access_Key_Id and Secret_Access_Key from section Creating Access Keys (AK and SK).
gsql -d <Database name> -h <Public network address of the cluster> -U <Administrator> -p <Data warehouse port number> -f <Path for storing the sample data script> -r
gsql -d postgres -h 10.168.0.74 -U dbadmin -p 8000 -f tpcds_load_data_from_obs.sql -r
In the preceding command, sample data script tpcds_load_data_from_obs.sql is stored in the sample directory (for example, dws_client_redhat_x64\sample) of the DWS client.
After you enter the administrator password and successfully connect to the database in the cluster, the system will automatically create a foreign table with the sample data to associate data outside the cluster, create a table, and then import data to the table.
When information similar to the following is displayed, the data is successfully imported.