Import Structure Step 1: Get the structure builder object used to create tables, columns and other needed structures.
function importStructure(context) {
try{
// Step 1: Get the structure builder object that is used to create tables/columns etc.
var builder = context.getStructureBuilder();
//optionally, create a progress manager to increment progress percentage in import structure status dialog and tasks
var progressManager = context.getProgressManager();
Import Structure Step 2: Construct and send an HTTPS request to get all of the tables.
// Step 2: Construct and send an https request to get all tables.
var URL = 'https://drive.google.com/uc?export=d...FJrak1oUVlpQzg';
var method = 'GET';
var body = '';
var headers = null;
ai.log.logInfo('Import Structure: Sending Request');
var response = ai.https.request(URL, method, body, headers);
Import Structure Step 3: With a successful HTTPS request, parse the HTTPS response body into an XML document.
// Step 3: if response was successful, parse the https response body into an XML document and create tables and columns
if (response.getHttpCode() == 200) {
ai.log.logInfo('Import Structure: Successful response received');
var parser = ai.xml.createParser();
var xmlDoc = parser.parse(response.getBody());
//Parse the https response body into a XML document
var data = parseData(response.getBody()); //returns data XML