In this exercise you will learn how to export your resultant data back to your AWS S3 bucket.
NOTE: The following example assumes that you are logged into Xcalar, that you have created a table or tables from your data source in Xcalar Load, that you are in a Project in the Xcalar Notebook workspace, and that you have created a table from your SQL statement.
To export your data back to S3:
- In the SQL Graph tab of App Builder, hover your mouse over the Out tab and then click and drag the Export graph-node into the SQL Graph’s canvas. A SQL Graph is view only message appears, stating that the graph is view only and must be saved as a module before changes can be made.
- Select Create new module.
- In the new module, repeat the step 1 operation of dragging the Export graph-node into the modules canvas.
- Connect the Join graph-node to the Export graph-node by selecting the Join’s intermediate table’s triangle and dragging your cursor to any part of Export graph-node.
- Right-click the Export graph-node and select Edit Operator. The Export operator’s configuration panel opens.
- Configure the Export operator’s settings as follows:
- In the Columns to export section, select the Select All check box.
- From the Export Method list, select Single CSV file.
- From the Target list, select Xcalar S3 Connector.
- In the File Path field, enter, as a relative path, the path, the destination directory, and the file name for the new exported file.
In this case use your Xcalar S3 bucket:
- Select the (Optional) header check box.
- In the Field Delimiter field, enter a comma (,) .
- In the Record Delimiter field, enter the new line characters (\n) .
- In the Quote Character field, enter the double quote character (” ) .
- Click Save.
NOTE: If an error message appears, verify that you have write privileges for the directory.
- (Optional) Verify that your myfirstdatapipeline CSV file has successfully been exported to your Xcalar S3 bucket, by doing the following:
- Click the Xcalar Home icon and then from the Xcalar Landing page, click Load.
- Verify that the Connector list is displaying the correct connector to your data source, in this case Xcalar S3 Connector.
- From the S3 Bucket field, select the Xcalar S3 bucket that was created for you.
- In the Path field, click Browse.
- In the Browse Data Source window, locate the export directory and your exported file. In this case myfirstdatapipeline.
Congratulations you have successfully exported your data into your Xcalar S3 bucket and completed this step-by-step tutorial.