Oracle DBMS_TRANSFORM
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Provides an interface to the message format transformation features of Advanced Queuing.
AUTHID DEFINER
Dependencies
DBMS_AQADM_VAR DBMS_TRANS_LIB DBMS_UTILITY
DBMS_TRANSFORM_INTERNAL    
Documented Yes
First Available 9.0.1
Security Model Owned by SYS with EXECUTE granted to the AQ_ADMINISTRATOR_ROLE and AQ_USER_ROLE roles
Source {ORACLE_HOME}/rdbms/admin/dbmstxfm.sql
Subprograms
 
COMPUTE_TRANSFORMATION
Undocumented dbms_transform.compute_transformation (
message               IN  "<ADT_1>",
transformation_schema IN  VARCHAR2,
transformation_name   IN  VARCHAR2,
transformed_message   OUT "<ADT_1>");
TBD
 
CREATE_TRANSFORMATION
Creates a transformation that maps an object of the source type to an object of the destination type dbms_transform.create_transformation (
schema         IN VARCHAR2(30),
name           IN VARCHAR2(30),
from_schema    IN VARCHAR2(30),
from_type      IN VARCHAR2(30),
to_schema      IN VARCHAR2(30),
to_type        IN VARCHAR2(30),
transformation IN VARCHAR2(4000) DEFAULT NULL);
exec dbms_transform.create_transformation('SCOTT', 'MYMAP', 'SCOTT', 'CART_POINT', 'SCOTT', 'POLAR_POINT', 'function_name(parameter)');
 
DROP_TRANSFORMATION
Drop a transformation dbms_transform.drop_transformation(schema IN VARCHAR2(30), name IN VARCHAR2(30));
exec dbms_transform.drop_transformation('SCOTT', 'MYMAP');
 
MODIFY_TRANSFORMATION
Modify a transformation dbms_transform.modify_transformation (
schema           IN VARCHAR2(30),
name             IN VARCHAR2(30),
attribute_number IN NUMBER,
transformation   IN VARCHAR2(4000));
exec dbms_transform.modify_transformation('aqadmin', 'MYMAP', 2, 'function_name(parameter)');
 
Demo
DBMS_TRANSFORM (Demo from $ORACLE_HOME/rdbms/admin/exechae.sql); BEGIN
  sys.dbms_transform.create_transformation(schema => 'SYS', name => 'haen_txfm_obj',
from_schema => 'SYS', from_type => 'ALERT_TYPE', to_schema => 'SYS', to_type => 'VARCHAR2', transformation => 'sys.haen_txfm_text(source.user_data)');
EXCEPTION
  WHEN OTHERS THEN
    IF sqlcode = -24184 THEN
      NULL;
    ELSE
      RAISE;
  END IF;
END;
/

-- which references
CREATE OR REPLACE FUNCTION haen_txfm_text(message in sys.alert_type) RETURN VARCHAR2 IS
EXTERNAL
NAME "kpkhetp"
WITH CONTEXT
PARAMETERS(context, message, message indicator struct, RETURN OCISTRING)
LIBRARY DBMS_HAEVENTNOT_PRVT_LIB;

Related Topics
Built-in Functions
Built-in Packages
DBMS_AQ
DBMS_AQADM
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved