Business Intelligence REST API Client
The Business Intelligence REST API client provides the following methods:
-
Client creation using
com.oracle.ceal.BicsRestClient(BicsClientRestClient.groovy)bicsClient=new BicsRestClient(bics Rest Url, proxy Host, proxy Port,cloud identityDomain, cloud username, cloud password, ignoreSSLCertificationPathErrors)-
Business Intelligence REST URL in the format: https://servername
Example: https://<SERVER>.oraclecloud.com
-
proxy host:-
Leave empty if not using a proxy
-
If using a tool like Fiddler for HTTP captures, specify
localhost. -
If you need to go through a proxy to connect to Oracle cloud services, specify the proxy host.
-
-
proxy port:-
Leave empty if not using a proxy
-
If using Fiddler, use 8888.
-
Otherwise, enter your proxy port.
-
-
Cloud identity domain: this is provided with your cloud login. You can also find this in the BI URL. -
ignoreSSLCertificationPathErrors (true or false): Set this to true if connecting through a proxy like Fiddler.
-
-
About bics
bicsClient.aboutBics() -
List all tables
bicsClient.listAllTables() -
Get table info
bicsClient.getTableInfo(table name) -
Delete table
bicsClient.deleteTable(table name) -
Create a table with X columns and a specific column name prefix
bicsClient.createTableToLoadCSV(table name, number of columns , column prefix)Example:
bicsClient.createTableToLoadCSV("ceal_4", 3 ,"MYCOL")This creates a table called
CEAL_4with three columns named:MYCOL1, MYCOL2, MYCOL3By default the columns have the following properties:
"dataType":"VARCHAR" // creates a VARCHAR2 column in database "length":300, "precision":0, "nullable":true, "defaultValue":null,These values can be modified in
BicsRestClient.groovyin thecreateTableToLoadCSVmethod -
Delete data from table
bicsClient.deleteDataFromTable(table name) -
Load data in table
loadDataInTableUsingCSV(tableName, localCsvFilePath, localCsvFileName, delimiterInCsv,numberOfColumnsInCsv,numberOfLinesToSkip,columnPrefixInTable,isZipped)Example:
bicsClient.loadDataInTableUsingCSV("ceal_4","d:\\temp","export.csv",",",3,0,"MYCOL",false) -
Create a table with a specific column name
bicsClient.createTableToLoadCSVWithHeaderNames("ceal_8", listHeaders ) -
Load data in table using mappings to specific column names
loadDataInTableUsingCSVAndHeader(tableName, localCsvFilePath, localCsvFileName, delimiterInCsv,numberOfLinesToSkip,listHeaders,isZipped)Example:
bicsClient.loadDataInTableUsingCSVAndHeader("ceal_8","d:\\temp",fileNameInZip,",",1,listHeaders,false)