platfora-config

In document Platfora Installation Guide (Page 98-104)

Displays the current settings of Platfora configuration properties, and allows you to update property settings. Requires one of the following sub-commands: get, set, load, server.

Synopsis

platfora-config [-h] [-q] [-v] [-V] get | reset | list | set |

load | server | get_dfs_path | set_dfs_path [sub-command options]

Description

The platfora-config command is used to manage Platfora server configuration properties. The Platfora server does not need to be running to use this utility. After resetting a property, you must restart Platfora for your changes to take effect.

platfora-config must be run with one of the following sub-commands:

get - Display all configuration properties and their current settings on the Platfora master or on the specified worker node.

list - Display all configuration properties and their current settings on the Platfora master or on the specified worker node. Same functionality as get.

set - Change the value of the specified configuration property.

load - Sets the properties specified in a configuration file on the specified Platfora worker node. • server - List the client-side Hadoop configuration property settings.

get_dfs_path - Get the current URI path of the given datasource in the remote file system. • set_dfs_path - Udate the URI path of the given datasource in the remote file system. Required Arguments

Requires either --help or one of the following sub-commands: get, list, set, load, server, get_dfs_path, or set_dfs_path.

Optional Arguments -h | --help

Shows the command-line syntax help and then exits. -q | --quiet

Runs in quiet mode. Do not send output messages to STDOUT. -v, -vv, -vvv | --verbose

Runs in verbose mode. Show all output messages. -V | --version

Shows the software version information and then exits. Examples

Show all configuration properties and their currently set values: platfora-config get

Set a configuration property:

platfora-config set --key platfora.license.expirationwarningdays --value 30

Update the datasource path of the Uploads and System data sources when you are migrating Platfora to a new Hadoop NameNode:

# To get the old paths

$ platfora-config get_dfs_path --datasource System $ platfora-config get_dfs_path --datasource Uploads # To set the new paths

$ platfora-config set_dfs_path --datasource System \

--old_path 'protocol://old_namenode_host:port/platfora/system' \ --new_path 'protocol://new_namenode_host:port/platfora/system'

$ platfora-config set_dfs_path --datasource System \

--old_path 'protocol://old_namenode_host:port/platfora/uploads' \ --new_path 'protocol://new_namenode_host:port/platfora/uploads'

platfora-export

Exports Platfora object metadata from the catalog database to one JSON file per object. Synopsis

platfora-export [-h] [-q] [-v] [-V] --username username

--password password [--server server_name] [--port port] [--protocol http|https][--all] [--namespace namespace_name] [--export-datasources data_source_name [...]] [--export-

datasets dataset_name [...]][--export-lenses lens_name [...]] [--export- vizboards vizboard_title [...]] [--export-users user_name [...]] [-- export-groups group_name [...]] [--include-referenced-datasources] [-- include-referenced-datasets] [--include-referenced-lenses] [--include- referenced-segments] [--include-permissions] [--lazy-fetch] [--skip- objects-by-name object_name]

Description

The platfora-export command exports Platfora object metadata from the catalog database. You can export one or more object types. When specifying an objects you use the name or, for vizboards, the title. For names or titles with spaces, enclose the name in quotes. You can also export multiple objects of each type. Separate each object with a space or user an * (asterisk) to export everything of that type. The command exports objects to .json files to a subdirectory in the current directory. The command labels the subdirectory with a type. Exported file names are URL-encoded along with the exported objects current version. For example, if you export the Web Logs the data source the command creates file here: datasources/Web%20Logs%20.json If a particular filename already exists, the command silently overwrites it.

Vizboards are the exception. Vizboard names need not be unique. For this reason, the export utility appends a unique identifier to the exported vizboard filename. When using one of the --include arguments to export referenced objects of a particular type, you must include all object types in between. For example, if you export a vizboards and want to include data sources (--include-referenced-datasources), you must also include lenses and datasets. If you forget to provide the proper includes, the command produces the exported object(s) you requested but none of the objects refrenced by them.

Required Arguments --username username

Username of a Platfora user account that has the appropriate object permissions on the objects to export. For example, to export an object, the user must be able to view the object in the web application.

--password password

Password for the specified user account. Optional Arguments

-h | --help

Shows the command-line syntax help and then exits. -q | --quiet

Runs in quiet mode. Do not send output messages to STDOUT. -v, -vv, -vvv | --verbose

Runs in verbose mode. Show all output messages. -V | --version

Shows the software version information and then exits. --server server_name

Hostname or IP address for the Platfora master node. Defaults to localhost. --port port

Port for the Platfora master node. Defaults to 8001. --protocol http|https

Specify which protocol to use to access the Platfora server, either http or https. Defaults to https when the port ends with 443, otherwise defaults to http.

--namespace namespace_name

Export objects from the specified namespace. You can only export objects from one namespace in a single call. Defaults to default.

--export-datasources data_source_name[...]

Export the specified data source. You can list multiple names to export multiple objects. Include names in double quotes if they contain spaces or other special characters.

--export-datasets dataset_name[...]

Export the specified dataset. Use this flag to export segments which are a special kind of dataset. Segments have two supporting lenses: segment members and segment refresh prerequisites; Include these using the --include-referenced-lenses flag. Include names in double quotes if they contain spaces or other special characters.

Export the specified lens. You can list multiple names to export multiple objects. Include names in double quotes if they contain spaces or other special characters.

--export-vizboards vizboard_title[...]

Export the specified vizboard by title. A vizboard title is the name users assign the vizboard in the Platfora web application. You can list multiple titles to export multiple objects. Include titles in double quotes if they contain spaces or other special characters. Vizboard title names may not be unique. If multiple vizboards use the same title, all vizboards with that title are exported, and each one is assigned a unique identifier.

--export-users user_name[...]

Export one or more users. Only administrators can export users and groups. --export-groups group_name[...]

Export one or more groups. Only administrators can export users and groups. --include-permissions

Export all permissions for all exported Platfora objects such as lenses or datasets. Users and groups do not have permissions.

--include-referenced-datasources

Use this argument to export all data sources referenced by a specified object. --include-referenced-datasets

Use this argument to export all datasets referenced by a specified object. --include-referenced-lenses

Use this argument to export all lenses referenced by a specified object. This option applies to lens references from segments and vizboards. This option does not support following references from datasets to the lenses that use them.

--include-referenced-segments

Use this argument to export all segment datasets and segment lenses referenced by a specified vizboard object. This argument only works when exporting vizboards.

--include-permissions

Use this argument to export all permissions for all exported objects. --lazy-fetch

When exporting a number of objects that are significantly less than the total number of objects in the catalog, use this argument to improve export performance. Defaults to false.

--skip-objects-by-name object_name[...]

of the --include-referenced-* arguments. By default, this command does not export system-created objects, these objects are:

Object Type Excluded by Default

group Everyone

user system

admin

data sources System

Uploads

datasets Date

Time

Latitude, Longitude with Name Latitude, Longitude

To override the defaults, provide an * (asterisk) or specify an object name to skip. --all

Export the entire catalog. This flags behavior is equivalent to: • --export-datasources "*"

--export-datasets "*"--export-lenses "*"

You must explicitly export permissions, users, and groups.

Examples

Export the "event log" vizboard and the lenses, data sources, and datasets that are used by that vizboard: $ platfora-export --username admin --password password --export-

vizboards "event log" --include-referenced-lenses --include-referenced- datasets --include-referenced-datasources

Export vizboards together with their permissions:

$platfora-export -vvv --username admin --password admin --export- vizboards "o_viz" --include-permissions

Export all data sources and the datasets used by those data sources:

$ platfora-export --username admin --password password --export- datasources "*" --include-referenced-datasets

$ platfora-export --username admin --password admin --server localhost --export-datasets "airports" "batting" "Carriers" --include-referenced- datasources

About to export datasets: [airports, batting, Carriers]

Exporting Dataset: "airports" to file: "datasets/airports.json" Exporting Dataset: "batting" to file: "datasets/batting.json"

Exporting datasource: "hive on cdh1" to file: "datasources/hive%20on %20cdh1.json"

Exporting Dataset: "Carriers" to file: "datasets/Carriers.json"

In document Platfora Installation Guide (Page 98-104)