Skip to content

Instantly share code, notes, and snippets.

View raj-arun's full-sized avatar
🎶
Focusing

Arun Raj raj-arun

🎶
Focusing
View GitHub Profile
@raj-arun
raj-arun / decode_generate_csv.ps1
Last active July 18, 2019 15:42
Decodes base64 response and generate csv file
#Decode and Generate CSV File
[xml]$report = Get-Content output.xml
$EncodedString = $report.Envelope.Body.runReportResponse.runReportReturn.reportBytes
$DecodedString = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($EncodedString))
$DecodedString | Out-File "temp.txt"
Import-CSV "temp.txt" -delimiter "," | Export-CSV EPM_Account_Metadata.csv -NoType
@raj-arun
raj-arun / catalog_payload.xml
Created September 22, 2019 16:57
Payload file to invoke BI Catalog Webserice
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
<soapenv:Header/>
<soapenv:Body>
<v2:getFolderContents>
<v2:folderAbsolutePath>/Custom/Demo BI/Common</v2:folderAbsolutePath>
<v2:userID>bi_user_name</v2:userID>
<v2:password>bi_user_name_password</v2:password>
</v2:getFolderContents>
</soapenv:Body>
</soapenv:Envelope>
@raj-arun
raj-arun / soap_payload.xml
Last active October 3, 2019 01:20
Soap Payload to select a specific layout while invoking the BI report using the web service call
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:attributeTemplate>XML_Template</pub:attributeTemplate>
<pub:reportAbsolutePath>/Custom/INTEGRATION/AP_Invoice_Import_Summary_Report.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
@raj-arun
raj-arun / user_payload.json
Last active December 27, 2019 14:18
Payload File to create a user in Oracle Cloud
payload = """{
"schemas":["urn:scim:schemas:core:2.0:User"],
"name":{"familyName":"Raj",
"givenName":"Arun"
},
"active":true,
"userName":"araj@quest4apps.com",
"emails":[{"primary":true,"value":"araj@quest4apps.com","type":"W"}],
"displayName":"Arun Raj",
@raj-arun
raj-arun / display_users.py
Created December 27, 2019 14:33
Display the list of users in user friendly format
users = response.json()
print("List of users : \n")
# Loop through the response and print the details
for user in users["Resources"]:
print("User Name : {}".format(user["userName"]))
print("Display Name : {}".format(user["displayName"]))
print("Active : {}\n".format(user["active"]))
@raj-arun
raj-arun / upload_to_epm.py
Last active June 2, 2020 00:25
Uplod File to EPM Using REST API
import requests
from requests.auth import HTTPBasicAuth
import os
user_name = 'domain_name.user_name'
password = 'your_password'
def read_in_chunks(file_object, chunk_size):
while True:
@raj-arun
raj-arun / gl_periods_single_parameter.xml
Created August 23, 2020 17:05
XML Payload to invoke a BI Report with Single Parameter
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:parameterNameValues>
<pub:item>
<pub:name>P_YEAR</pub:name>
<pub:values>
<pub:item>2019</pub:item>
@raj-arun
raj-arun / gl_periods_multiple_parameters1.xml
Created August 23, 2020 17:11
XML Payload to invoke a BI Report with multiple parameters accepting single values
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:parameterNameValues>
<pub:item>
<pub:name>P_YEAR</pub:name>
<pub:values>
<pub:item>2019</pub:item>
@raj-arun
raj-arun / gl_periods_multiple_parameters2.xml
Created August 23, 2020 17:44
XML Payload to invoke a BI Report with multiple parameters accepting multiple values
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:parameterNameValues>
<pub:item>
<pub:name>P_YEAR</pub:name>
<pub:values>
<pub:item>2019</pub:item>
@raj-arun
raj-arun / get_data_source.sql
Last active January 16, 2021 16:58
get_data_source.sql
SELECT
TRT.NAME MATCH_TYPE_NAME
, TDS.NAME DATA_SOURCE_NAME
, TDS.DYNAMIC_TABLE_NAME
FROM
TM_DATA_SOURCE TDS
,TM_RECON_TYPE TRT
WHERE
TDS.RECON_TYPE_ID = TRT.RECON_TYPE_ID
AND UPPER(TRT.NAME) = UPPER(<Match Type Name>)