In this IBM Cloud SQL Query tutorial, we'll set you up to begin querying rectangular data in IBM Cloud Object Storage and storing the results in Object Storage.
Before you begin
Before you can run SQL queries, you need to have one or more Cloud Object Storage buckets to hold the data to be analyzed and to hold the query results. Cloud Object Storage offers several plans, including a free "Lite" plan. To create a Cloud Object Storage instance:
- Go to the page.
Select one of the plans and create the service.
To find your Cloud Object Storage instance at a later point of time, go to your . (If you do not see it in the list, select the resource group "All Resources".)
We can now manage and browse the buckets and data the instance contains. Click here for more information about how to use Cloud Object Storage.
Step 1: Create your SQL Query service instance
Step 2: Execute one of the samples to see how to use the service
- Select a sample query. This loads it into the editor. The input data used by the sample queries is available in a publicly accessible bucket.
- The Target field is automatically filled in with the unique resource identifier (URI) of your default bucket. We can use this bucket or specify an INTO clause in your query.
- Click Run to run the query. The query result is displayed below the editor.
- Each sample data set is available in each of the supported input data formats (CSV, JSON, ORC, and Parquet). To experiment with different formats, edit the selected sample query and change the specified file name and format. For example, change orders.parquet STORED AS PARQUET to orders.orc STORED AS ORC.
Next steps
To analyze your own data (CSV, JSON, ORC, or Parquet), upload it to an Cloud Object Storage instance and run SQL queries as described here.
For more advanced capabilities, check out these video tutorials:
- How to run basic queries
- How to connect to IBM Cloud Object Storage Through the Command Line
- How to use the SQL Query REST API
- How to operationalize SQL code and call it from an application