Presto Administration : Presto Server Administration : Deploying Presto Instances, Clusters or Artifacts : Importing Pluggable Views or Libraries
Importing Pluggable Views or Libraries
you must have either:
*A library export file to import containing pluggable views or libraries from another Presto Server. See Exporting Pluggable Views or Libraries for instructions.
*A directory containing resources for one pluggable view or pluggable library to import or update, plus an optional configuration file to provide additional metadata.
You may use this command to deploy pluggable views and pluggable libraries that you have exported from one Presto Server to another Presto Server. See Example for an example of this usage.
You may also use this command to add to or update pluggable views or pluggable libraries Presto based on source files on your computer.
1. If it is not started, start the Presto Server for the Presto Repository where you wish to import data. See Start and Stop the Presto Server for instructions.
2. Open a command or terminal window and move to the presto-install/prestocli/bin folder.
3. Enter this command:
padmin importLib [-d input-directory] [-f input-file]
[-q filter] [-o] [-c] [-l prestoURL] -u username
-w password [-v]
*-d input-directory: the root directory containing configuration and resources for one pluggable view or pluggable library to add to or update in Presto.
Note:  
You must include either the -d or the -f option
*-f input-file: the path and name of the export ZIP file to use to import views and libraries from another Presto Server.
Note:  
You must include either the -d or the -f option.
*-q filter: defines which pluggable views and libraries to import from the ZIP input file specified in the -f option. This option is not valid with the -d option.
The filter can be:
*"all" to import all pluggable views and pluggable libraries from this input file. You can also use "ALL" or "*".
*"author=list-of-owner-ids", the user ID for a specific user or a list of comma-separated user IDs. This imports the pluggable views and pluggable libraries listed in the input file that are owned by those users.
*"mine", to import all pluggable views or libraries from the input file that are owned by the user identified by the credentials used to execute this command (in the -u option).
*"ids=list-of-app-ids", the ID for a specific pluggable view or pluggable library or a list of comma-separated view or library IDs. This imports those specific views or libraries from the input file.
*"name=list-of-library-names", a specific pluggable view or library name.
*"type=view", to import only pluggable views from the input file.
*"subtype=view-category-name", to import only pluggable views that belong to the specified view category from the input file.
*-c: an optional flag to allow the import process to continue after import errors. By default, any import errors stop all further processing.
*-o: an optional flag to allow import information for a view or library to overwrite an existing view or library with the same ID.
*-l prestoUrl: an optional URL to the Presto Server where these views and libraries should be imported to. If you omit this option, this defaults to http://localhost:8080/presto/edge/api.
Use this option if the Presto Server is remote, if it is not running in Tomcat or if it is not using the default Tomcat port.
*-u username: the Presto username to use as credentials to execute this command. With the -d option, this also becomes the owner of the pluggable view or library that is imported or updated unless the properties file for this import specifies an owner.
*-w password: the Presto password to use as credentials to execute this command.
*-v: an optional flag to turn on verbose logging.
Messages and errors from the import process are sent to the console window (stdout).
Example
The following example from a Windows environment, imports all pluggable views and libraries from the import file localCustomViews.zip to the local Presto Server.
c:\Prestoversion\prestocli> padmin importLib
-q "all" -f localCustomLibs.zip -u Administrator -w manage
The following example from a Windows environment, imports only the pluggable views in the view category network from the import file remoteCustomViews.zip to the local Presto Server.
c:\Prestoversion\prestocli> padmin importLib
-q "subtype=network" -f remoteCustomLibs.zip -u Administrator -w manage
For examples of adding pluggable views or libraries with the importLib command, see Import Pluggable Library/View Examples and Managing Updates and Library Versions.
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback