Forum

This content is now out of date.

Visit Our Community

Standalone content tools

Yellowfin includes tools to create data sources and import content from the command-line. The details for these tools are below.

Command-line Data Source Creation

Yellowfin comes with a command line data source creation utility which allows third-party installers to automatically configure data sources. When used with the Yellowfin Command Line Importer, a third-party installer can configure out-of-the-box reporting, without having to manually configure data sources and reporting content.

The command line tool is built into the standard Yellowfin installation, and hence, is only available after a successful Yellowfin installation. The tool makes changes to the Yellowfin database, and should only be used when Yellowfin is not running.

The data source creation tool can be run by executing:

[code]java -cp com.hof.standalone.CreateDataSource [/code]

The classpath specified on this line should include all the jar files that are included in the Yellowfin/appserver/webapps/WEB-INF/lib directory.
The propertiesfile parameter is the name of the properties file that has the details for the new data source.

An example properties file is available from this link.

The data source creation program will return an error code indicating success or failure.

Return Codes:
0 � Data source successfully created.
1 � Properties file not specified.
2 � Could not parse the properties file.
3 � Could not initialise connection to Yellowfin database.
4 � Could not create the new datasource.

Command-line Content Importer

Yellowfin comes with a command line content import utility which allows third-party installers to automatically load reporting content (views, dashboard tabs and reports) into a Yellowfin installation.

The command line importer is built into the standard Yellowfin installation, and hence, is only available after a successful Yellowfin installation. The tool makes changes to the Yellowfin database, and should only be used when Yellowfin is not running.

The import tool can be run by executing:

[code]java -cp com.hof.standalone.ImportData [/code]

The classpath specified on this line should include all the jar files that are included in the Yellowfin/appserver/webapps/WEB-INF/lib directory and the Yellowfin/appserver/common/lib folder.
It is worth noting that JDK 1.6 introduced a classpath wildcard, this means you don't have to individually name all the jar files, so an example (up to YF 6.0) would be something like:
[code]java -cp "C:/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib/*;C:/Yellowfin/appserver/common/lib/*" com.hof.standalone.ImportData "C/MyConfigurations/import.properties" "C:/MyExports/YellowfinExport(69).xml"[/code]

N.B. In YF 6.1 the path:
[code]yellowfin/appserver/common/lib/*.jar[/code]
has changed to
[code]yellowfin/appserver/lib/*.jar[/code]


The propertiesfile parameter is the name of a file that has the details for the content to be imported. The importfile parameter is a Yellofwin export xml file that contains the content to import.

An example properties file is available from this link.

The command line import program will return an error code indicating success or failure.

Return Codes:
0 � Content imported successfully.
1 � Properties file and import file not specified.
2 � Could not parse the properties file.
3 � Could not initialise connection to Yellowfin database.
4 � Could not parse the import file.
5 � Could not find a referenced reporting element (datasource, category, report or view)
6 � Import failed.