Forum Stats

  • 3,734,456 Users
  • 2,246,974 Discussions
  • 7,857,300 Comments

Discussions

Exporting to specified folder using -dir

Scott Wesley
Scott Wesley Member Posts: 5,969 Gold Crown

I've started using SQLcl 20.2 to explore the Liquibase integration, not the most recent version because of this issue.

Now my APEX exports are exporting successfully, and the destination folder can also be parameterised.

SQL> lb genobject -type apex -applicationid 300 -dir /lb
Exporting Application 300
Action successfully completed please review created file /lb/f300.xml

However, if I try the same -dir parameter for tables, the destination is ignored.

SQL> lb genobject -type table -name my_table -dir /lb
Action successfully completed please review created file my_table_table2.xml

I've tried a few variations without success.

SQL> lb genobject -dir /lb -type table -name my_table
Action successfully completed please review created file my_table_table3.xml
SQL> lb genobject -type table -name my_table -dir ./lb
Action successfully completed please review created file my_table_table4.xml
SQL>

This is on an 11.2.0.4 database.

Answers

  • Agustin Conejos
    Agustin Conejos Member Posts: 15 Green Ribbon

    Using SQLcl 21.1 and 20.4


    if you export apex type without -dir the path is created incorrectly

    the lb genobject command created the whole path twice

    >pwd

    /home/user/repo/apex/home/user/repo/apex/f1000/application/


    if i use a -dir parameter i get a plain error

    SQL> lb genobject -type apex -applicationid 1000 -dir /home/user/repo/apex -split

    Processing has failed for your request.

    ERROR: Unknown parameter -dir

  • Agustin Conejos
    Agustin Conejos Member Posts: 15 Green Ribbon
    edited Jun 2, 2021 10:40AM

    -dir parameter is failing in all versions tested


    20.2, 20.3, 20.4 and 21.1 exporting apex with specific path is not working

    Processing has failed for your request.

    ERROR: Unknown parameter -dir

  • User_H3J7U
    User_H3J7U Member Posts: 172 Silver Badge

    lb help genobject indicates -dir only for -type {APEX}. For database objects there is no -dir option:

    Generate change log for a specific database object
    
    named arguments:
     -type TYPE            Type of Object in the database
     -name NAME            Object name
    
    Common Generator Arguments:
     -context CONTEXT      ChangeSet contexts to execute
     -label LABEL          Filter the changelog using labels
     -fail                 sets failOnError value in changeset (default: false)
     -replace              sets replaceIfExists value  in changeset (default:false)
     -runonchange          sets runOnChange value in changeset (default: false)
     -runalways            sets runAlways value in changeset (default: false)
     -debug                Generate and display additional debug output (default:false)
    

    Try cd command.

Sign In or Register to comment.