-
Notifications
You must be signed in to change notification settings - Fork 23
Control Variables
Provide the sections for generating the OCI360 outputs. This parameter is optional.
If you need to execute only a portion of OCI360 (i.e. a column, section or range) use this variable. Notice that it can be set to one section (i.e. 3b), one column (i.e. 3), a range of sections (i.e. 5c-6b) or range of columns (i.e. 5-7).
Notes:
- The first argument of oci360.sql call can also be used to restrict the sections. eg: @oci360.sql 1c
- If both the first argument is passed and also the variable is defined, only the argument will be considered.
Example 1:
SQL> DEF moat369_sections = '1-2'
SQL> @oci360.sql
Example 2:
SQL> @oci360.sql 1-2
Valid values are: "PRE_LOAD" (default), "ON_DEMAND" or "OFF".
- PRE_LOAD - Will load all the JSONs file within the ZIP on each corresponding table at the beginning of code execution.
- ON_DEMAND - Will load the JSONs file within the ZIP before on running each oci360 section.
- OFF - Will not load the tables from the ZIP. Useful if your tables are already pre-loaded and if oci360_clean_on_exit is OFF.
PS: If you run the code passing a section argument (eg: @oci360 1a), "ON_DEMAND" option will be the default (if unspecified) to avoid loading unnecessary tables.
Notes:
- The second argument of oci360.sql call can also be used to define the "load mode", accepting the same values: eg: @oci360.sql '1a' 'OFF'
- If both the second argument is passed and also the variable is defined, only the argument will be considered.
Example 1:
SQL> DEF oci360_load_mode = 'OFF'
SQL> @oci360.sql
Example 2:
SQL> @oci360.sql '' OFF
Valid values are: "REPORT_ONLY" (default), "LOAD_ONLY" or "FULL".
- REPORT_ONLY - Will run the Converter and Reporter phases on OCI360.
- LOAD_ONLY - Will run the Converter phase only on OCI360. Useful if you just want to load the OCI360 internal tables.
- FULL - Will run also call the oci_json_export.sh before running OCI360 converter and reporter phase.
PS: FULL option is not yet implemented. You need to run the oci_json_exporter.sh and put the ZIP on OCI360 folder manually before calling OCI360.
Valid values are: "ON" or "OFF" (default).
- ON - Will drop all OCI360 created tables at the end. Useful if you don't want to keep your tenancy data exposed on the database after OCI360 execution.
- OFF - Will keep all the OCI360 created tables at the end. Useful if you want to run the reporter later again with oci360_load_mode = OFF or build your own SQLs to query the metadata model.
Example:
SQL> DEF oci360_clean_on_exit = 'OFF'
SQL> @oci360.sql
Valid values are: "Y" or "N" (default).
- Y - Will remove all the billing info from the report.
- N - Will keep all the billing info on the report.
Example:
SQL> DEF oci360_skip_billing = 'Y'
SQL> @oci360.sql
Provide the "/PATH/" for generating the OCI360 outputs. This parameter is optional.
Notes:
- If not specified, the output will be placed on the same folder where the oci360.sql tool is located.
- The JSONs ZIP file (extracted using oci_json_export.sh) must be placed on this folder.
- If you choose to not give "CREATE ANY DIRECTORY" to the oci360 run user, you must prior create a database directory pointing to this path as DBA and give READ/WRITE to the run user.
Example:
SQL> DEF moat369_pre_sw_output_fdr = '/home/oracle/oci360_output/myten'
SQL> @oci360.sql
Provide the "DATABASE USER" for generating the OCI360 tables. This parameter is optional and will only be used when you are connected as SYS.
Notes:
- If not specified, the output will be placed on the same user who is running oci360.sql code.
- Useful if you run the OCI360 as SYS and wants to place the generated tables into another database account.
- Note that if you run the code as SYS and don't specify this parameter, it will default to SYSTEM.
Example:
SQL> DEF oci360_pre_obj_schema = 'OCI360_ACC'
SQL> @oci360.sql
(Valid for Autonomous Database only)
Provide the database credential object and the full bucket URI. Those values will be used by DBMS_CLOUD package to load the bucket CSV and JSON files within the ADB.
Notes:
- When oci360_adb_cred is defined, oci360_adb_uri must also be defined.
- When the variables are defined, the tool will run for Autonomous Database mode, instead of local Database.
Example:
SQL> DEF oci360_adb_cred = 'OCI360_CRED'
SQL> DEF oci360_adb_uri = 'https://objectstorage.us-ashburn-1.oraclecloud.com/n/xxx/b/oci360/o/'
SQL> @oci360.sql
Valid values are: "OFF" (default) or "ON".
- ON - Will spool everything that is happening and your output htmls will be a mess. Only useful if you want to DEBUG your code in case it get stuck somewhere.
- OFF - Default behaviour.
Example:
SQL> DEF DEBUG = 'ON'
SQL> @oci360.sql
(Only use this if you want to do everything manually.)