Miscellaneous
You are looking at an older version of the documentation. The latest version is found here.
SYSADMIN.checkSortOrder
This stored procedure queries the specified column, sorts data using a DBMS native ORDER BY
, sorts the same data internally in the Data Virtuality Server, and returns differences between the two result sets.
SYSADMIN.checkSortOrder(IN schemaName string NOT NULL, IN tableName string NOT NULL, IN columnName string NOT NULL, IN maxRows integer)
Example
CALL SYSADMIN.checkSortOrder('test_tables', 'test_e', 'e', 5)
SYSADMIN.getJwtToken
This procedure calculates the JSON Web Token required for the Adobe Analytics connector.
SYSADMIN.getJwtToken(IN payload clob NOT NULL, IN privateKeyPath blob NOT NULL, OUT token string RESULT)
It supports different ways of providing a private key:
- Text in PEM format (in base64);
- Path for a file with a private key in PEM or DER format;
- Byte stream from a file data source.
Examples
-- JSON Web Token as text
SELECT * FROM (CALL "SYSADMIN.getJwtToken"(
"payload" => '{
"exp": 1551273453,
"iss": "A@AdobeOrg",
"sub": "A@techacct.adobe.com",
"https://ims-na1.adobelogin.com/s/ent_analytics_bulk_ingest_sdk": true,
"aud": "https://ims-na1.adobelogin.com/c/4"
}'/* Mandatory */,
"privateKeyPath" => to_bytes('-----BEGIN PRIVATE KEY-----
privatkey
-----END PRIVATE KEY-----', 'UTF-8')/* Mandatory */
)) AS s;;
-- JSON Web Token as a file path
SELECT * FROM (CALL "SYSADMIN.getJwtToken"(
"payload" => '{
"exp": 1551273453,
"iss": "A@AdobeOrg",
"sub": "A@techacct.adobe.com",
"https://ims-na1.adobelogin.com/s/ent_analytics_bulk_ingest_sdk": true,
"aud": "https://ims-na1.adobelogin.com/c/A"
}'/* Mandatory */,
"privateKeyPath" => 'C:\\DataVirtuality\\testdata\\secret.pem'/* Mandatory */
)) AS s;;
SELECT * FROM (CALL "SYSADMIN.getJwtToken"(
"payload" => '{
"exp": 1551273453,
"iss": "A@AdobeOrg",
"sub": "A@techacct.adobe.com",
"https://ims-na1.adobelogin.com/s/ent_analytics_bulk_ingest_sdk": true,
"aud": "https://ims-na1.adobelogin.com/c/A"
}'/* Mandatory */,
"privateKeyPath" => 'C:\\DataVirtuality\\testdata\\secret.key'/* Mandatory */
)) AS s;;
-- JSON Web Token as a stream from a file
BEGIN
DECLARE blob key = SELECT file FROM (CALL testdata.getFiles('secret.key')) AS a;
DECLARE string payload = SELECT '{
"exp": 1551273453,
"iss": "A@AdobeOrg",
"sub": "A@techacct.adobe.com",
"https://ims-na1.adobelogin.com/s/ent_analytics_bulk_ingest_sdk": true,
"aud": "https://ims-na1.adobelogin.com/c/A"
}';
SELECT * FROM (CALL "SYSADMIN.getJwtToken"(
"payload" => payload,
"privateKeyPath" => key
)) AS s;
END;;
encryptionAlgorithm
and jwtHeader
parameters for the getJwtToken
procedure are available since v2.4.16
RS384, RS512, PS256, PS384, PS512, ES256, ES384, and ES512 algorithms are supported by the getJwtToken
procedure since v2.4.16
SYSADMIN.md5
This procedure returns the md5 hash value for a given parameter.
SYSADMIN.md5(IN param string, OUT hash string)
Example of usage:
SELECT hash FROM (CALL SYSADMIN.md5(1)) AS a WHERE hash=ucase('c4ca4238a0b923820dcc509a6f75849b');
md5 accepts an empty/null string or whitespace-like tab:
- For null value, there is going to be just an empty string as result;
- For non-null value (empty string, string with whitespaces or tabs, etc.), md5 will be calculated and returned as result.
Examples
SELECT hash FROM (CALL SYSADMIN.md5('')) AS a;
SELECT hash FROM (CALL md5(null)) AS a;
SYSADMIN.sendOracleADWCWallet
This procedure uploads a wallet file for an Oracle ADWC data source.
SYSADMIN.sendOracleADWCWallet(IN trustStorePassword string NOT NULL, IN base64Wallet string NOT NULL)
SYSADMIN.sendOracleADWCWallet
procedure was available since v2.3.7; removed in v2.4.5
SYSADMIN.setRemark
This procedure sets a remark for a given table, column, procedure, or view.
SYSADMIN.setRemark(IN name string NOT NULL, IN remark string NOT NULL)
Example of usage:
CALL "SYSADMIN.setRemark" (
"name" => 'views.employee'
,"remark" => 'here remark was set for the view/proc'
) ;;
CALL "SYSADMIN.setRemark" (
"name" => 'adv.contacttype'
,"remark" => 'here remark was set for the table'
) ;;
CALL "SYSADMIN.setRemark" (
"name" => 'adv.contact.FirstName'
,"remark" => 'here remark was set for the column'
) ;;
The setRemark()
procedure can be used with OPTION $NOFAIL
. Here is an example for this:
CALL "SYSADMIN.setRemark" (
"name" => 'adv.contact.FirstName'
,"remark" => 'here remark was set for the column'
) OPTION $NOFAIL;;
The Data Virtuality Exporter will not export remarks set on physical data sources, as well as those set on tables, views or procedures stored in such a data source. Remarks set on virtual schemas and objects will be exported.
Furthermore, the Data Virtuality Exporter adds OPTION $NOFAIL
to all setRemark()
system procedures.
SYSADMIN.sleep
This procedure pauses execution of the current process for the specified time in milliseconds.
SYSADMIN.sleep(IN millis long NOT NULL))
Example
In this example, the sleep time is set to 5 seconds:
CALL SYSADMIN.sleep(5000)