Support

Lorem ipsum dolor sit amet:

24h / 365days

We offer support for our customers

Mon - Fri 8:00am - 5:00pm (GMT +1)

Get in touch

Cybersteel Inc.
376-293 City Road, Suite 600
San Francisco, CA 94102

Have any questions?
+44 1234 567 890

Drop us a line
info@yourdomain.com

About us

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec.

In our last post we have outlined the general process on how to add support for additional databases to ReportServer. Today we will give another example by explaining the necessary steps on how to access a Vertica database with ReportServer.

The process is pretty much the same, we also start by writing a script that defines a new implementation of DatabaseHelper:

 class Vertica extends DatabaseHelper { public static final String DB_NAME = "Vertica"; public static final String DB_DRIVER = "com.vertica.jdbc.Driver"; public static final String DB_DESCRIPTOR = "DBHelper_Vertica"; @Override public String getDescriptor() { return DB_DESCRIPTOR; } @Override public String getDriver() { return DB_DRIVER; } @Override public String getName() { return DB_NAME; } @Override public String createDummyQuery() { return 'select 1 from dual'; } } 

In the next step we add the necessary calls to the script, to register the new driver with ReportServer

 def HOOK_NAME = "DATASOURCE_HELPER_VERTICA" def callback = [ provideDatabaseHelpers : { return Collections.singletonList(new Vertica()); } ] as DatabaseHelperProviderHook; GLOBALS.services.callbackRegistry.attachHook(HOOK_NAME, DatabaseHelperProviderHook.class, callback) 

The complete script is available for download here: AddVerticaSupport.groovy

Before you proceed, you have to add the Vertica jdbc driver to your classpath.
Download the driver from my.vertica.com and place it in the WEB-INF/lib subdirectory of your ReportServer installation. You might have to restart ReportServer afterwards.

Now open ReportServer and change to the filesystem admin module. Put the script somewhere below the bin directory in the fileserver.

To execute the script open the terminal by pressing CTRL+ALT+T and use the cd command to change into the directory where you placed the script

cd /fileserver/bin

Execute the script by typing

exec -g AddVerticaSupport.groovy

The -g argument is important, to execute the script in the global context. Otherwise the new DatabaseHelper will only be present in your current session. After pressing F5 to reload your browser you will be able to select Vertica as the database type, when creating a new datasource.

Beware, that after restarting ReportServer hooks attached from the terminal will no longer be present. To automatically attach a hook on startup put the script in the bin/onstartup.d directory in the fileserver.

Zurück

InfoFabrik GmbH

Wir wollen, dass alle Unternehmen, Institutionen und Organisationen, die Daten auswerten, selbständig und zeitnah genau die Informationen erhalten, die sie für ein erfolgreiches Arbeiten benötigen.

InfoFabrik GmbH
Klingholzstr. 7
65189 Wiesbaden
Germany

+49 (0) 611 580 66 25

Kontaktieren Sie uns

Bitte addieren Sie 1 und 4.
Copyright 2007 - 2024 InfoFabrik GmbH. All Rights Reserved.

Auf unserer Website setzen wir Cookies und andere Technologien ein. Während einige davon essenziell sind, dienen andere dazu, die Website zu verbessern und den Erfolg unserer Kampagnen zu bewerten. Bei der Nutzung unserer Website werden Daten verarbeitet, um Anzeigen und Inhalte zu messen. Weitere Informationen dazu finden Sie in unserer Datenschutzerklärung. Sie haben jederzeit die Möglichkeit, Ihre Einstellungen anzupassen oder zu widerrufen.

Datenschutzerklärung Impressum
You are using an outdated browser. The website may not be displayed correctly. Close