Uploading from FTP

The 1010data Python SDK enables you to upload tables to the 1010data Insights Platform using the load API.

The Session class contains the addTable method, which loads data to the Insights Platform from an FTP account. Typically this method is used for very large tables containing a lot of data.
addTable(self, spec, sync=False)

The addTable method requires the spec parameter. The spec refers to an XML string specifying information about the upload. For more information, refer to addtab (Load a large table) in the 1010data API Reference Manual. You can use the autoSpec method to create a spec file from a few rows of data. The XML generated by the autoSpec method may need to be edited afterward.

The sync parameter specifies if the load is done synchronously. If you set this to True, addTable waits until the load is completed, or an error occurs, to return the name of the new table. False specifies that addTable should return the name of the table immediately, before it is fully loaded to the Insights Platform.

To get the status of an asynchronous load, you can use the addTableStatus method. This method returns a status number (0-5) and the number of records that have been uploaded so far.