how to create a properties file for birt reports? - properties

I have multiple BIRT reports that obtains the data from the same jdbc data source.
Is it possible to obtain the conection parameters (Driver URL, User Name, and Password) from an external property file or similar?

You could store your data sources in a library - see here and here.

Related

Pentaho Report Use parameter in host name in JDBC Data Source

I created a report shown in Pentaho Dashboard.
The Dashboard is implemented on many machines.
So, I must edit JDBC DataSouce in all SubReports in my report to match the hostname to introduce environment. (I am using MySQL)
Can I use a parameter in the hostname in DataSource ex. ${HostName}?
I tried to do that, but then the value wasn't shown in DataSet when I clicked DataSource and clicked SelectQuery.
I solved it myself.
I make report in Pentaho Report Designer with JNDI connection.
I published its report to my BI Server.
I edited these two files.
\biserver-ce\tomcat\conf\context.xml
\biserver-ce\tomcat\webapps\pentaho\WEB-INF\web.xml
Then the report showed data in datasource in context.xml.

How do I access netsuite data using SQL language

A company uses netsuites to make purchase orders and store sales information. The only way this company is able to access this information at the moment is through building netsuites reports
Is there a way SQL language could be written to access the netsuites data as some of the questions asked by the business need something a bit more complex than what netsuites reporting provides - and sound very easy using SQL language
I have experience in Oracle, mysql, and many other SQL languages so I would like to know how to set up a connection to the companies netsuites data so I can help write custom queries
Netsuite has SuiteAnalytics Connect, which is ODBC. It can be downloaded from a link at the very bottom the home screen of your Netsuite account.
After installation of the application bundle and connecting it to your Netsuite, you can write ORACLE SQL queries via Excel, Access, etc. My experience is that Netsuite uses Oracle SQL in ODBC queries and in Saved Search custom queries.
The way I understand it, the ODBC driver is a separately priced item from NetSuite. Once you have that, you could use Excel, Access, Crystal Reports or anything else that can use the ODBC driver to read the data and write queries against it.
The normal way to access NetSuite data is with SuiteScript -- javascript code that uses the nlapi* calls to get to the data.
You can access Netsuite backend using a number of different tools and it allows running Oracle SQL directly.
Netsuite provides JDBC, ADO.NET and ODBC if it was included in your licensing purchase. You can find the downloads from the main menu - lower left hand of the screen in Settings - Set Up SuiteAnalytics Connect.
ADO.net however is pretty worthless in SSIS as it doesn't allow parameter mapping or SQL from a variable value. I have yet to get the ODBC driver to work correctly - it can connect and show columns of a table but it won't validate saying "The ODBC Source.Outputs[ODBC Source Error Output].Columns[...] on the error output has properties that do not match the properties of its corresponding data source column."
The other options I'm looking into are Cozyroc and Kinsgwaysoft adapters for Netsuite. You could also do SOAP or REST connections if desired.
I've not used this, but there should as of 2014.2 there is an ODBC driver available for read access.
http://www.netsuite.com/portal/landing/2014-2/suiteanalytics.shtml
As previously mentioned, if you have it licensed you can download the ODBC driver from the Netsuite application. I tested some other adapters but found Netsuite's at least as good as the competitors and they provide timely security updates to the drivers as well as both 64 and 32 bit versions.
There are also metadata browsers that are on the net (example is URL below), the type of browser being based on which kind of access you are looking at (web services, verses ODBC, etc).
https://system.sandbox.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/odbc/record/account.html
Within the application GUI there is information you need to connect using their ODBC connection (you need the account id and the role id). The URL is just odbcserver.xxxx.netsuite.com where xxx is specific to your environment you are accessing. Note that other adapters such as Cozyroc, etc. require the admin to setup connections in Netsuite for those.
Here is a list of the main metadata tables:
OA_FKEYS
OA_TABLES
OA_COLUMNS
In addition, note that the URL above does NOT include customization. Plus its not easily consumed by automation tools. But Netsuite provides a set of metadata views within the repository which you can use ODBC to pull from which includes all keys - foreign and primary. AND it does include customizations! I built simple set of ETL jobs that use standard ADO.NET driver within SSIS and the ODBC DSN to pull all the metadata and then use BIML to automatically generate all the extract ETL and related staging tables. You can also easily then use the metadata to detect changes in the underlying database.
Let me know if I can be any help with doing any of this.
There are 3rd party tools, like CData ODBC Adapter for NetSuite: http://www.cdata.com/drivers/netsuite/odbc/ . This tool allows you to run standard SQL against the NetSuite API. Note that the NetSuite API presents a very different data model from that of the native NetSuite ODBC.
With this tool, you install in onto your machine (Win in my case) and then after you configure the driver, you can run SQL against it (the driver config is where you specify your NS credentials, etc.).
It revolutionizes access to NetSuite data IMHO.
Download the Netsuite ODBC drivers, set up your DSN locally with server/credentials, Use SSIS pkgs to automate data extract and load onto you local DB. Use ADO.NET drivers if preferred. Then utilize those tables to create/deliver your complex reports using SQL (stored procedures) and Reporting Services. This will require SQL Standard license at minimum though.
Only API call can access the NetSuite data
You can't access to Netsuite data using sql language.
The only way to gain access to Netsuite from third party systems is to use SOAP request or PHP toolkit.

Pentaho CDE how use my database

I'm trying to create a Penaho Dashboard using CDE and I have problems accessing my Data.
I have found tutorials but they always use SampleData or Steel Wheels. I have managed to do that myself, but I need to access my own database.
I was able to connect with my oracle database from the Data Source manager and created my own Data Source. But now I don't know how to access those tables from CDE. If I chose "sql datasource" I see the SampleData datasource and can do queries on it, but not the one I created with my database.
So, once I create a connection with my orcale database, how do I access my tables from CDE?
Thanks
There are two options:
SQL over JDBC: you define the db host, port, name, username and password;
SQL over JNDI: it'll use a registered JNDI from the Pentaho platform.
The JNDI field is an auto-complete field and fills in the various available options. However, if your newly created connection doesn't show up there, don't worry. Just type it in, it'll work.
you have to setup your data-source..
Click on datasources-panel on right corner
Click on sql Queries from the list you have seen on left side.
then click on sql over sqljndi
now here in properties in jndi set your database connection you want to access.
you can-not see the out-put of particular query in CDE for that open the same file in CDA for checking particular query's result(which you can find under files section).

Use ReportingService API to read custom data source credentials

We have an SQL 2008 R2 server running reporting services and I would like to identify reports that use specific credentials to connect to a data source. In this situation, the reports connect to the data source using a custom data source with a specific user account that has the proper security on the SQL server to run the reports.
Plan plan was to query [ReportServer].[dbo].[Catalog] to get a list of reports. Then run it through the code below to identify the reports using credentials I'm interested in. All of this would be done in an SSIS package.
Using the ReportingService API, I can read the user name of the credentials in the connection strings of shared data sources. The code is listed below. However, in my case, I need to load the data source credentials from a custom data source specific to the report, not a shared data sources. The GetDataSourceContents method doesn't seem to support this. If I supply the report name & path instead of the shared data source, it generates an error.
Is there another way to approach this? We have hundreds of reports, so using the UI to look this information up would be impractical.
Thanks in advance.
NOTE: "web_service" is the web service reference to the report server (http://[servername]/ReportServer/ReportService2005.asmx?WSDL)
Dim rs As New web_service.ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim ds_def As web_service.DataSourceDefinition
ds_def = rs.GetDataSourceContents("/Data Sources/data_source_1")
With MyCredentialsOutputBuffer
.AddRow()
.UserName = ds_def.UserName
End With
You will need to pull down the rdl content and parse it:(
Embedded data source information is stored in the .rdl and not a shared data set item obtained via the api. Even then you can't retrieve data source passwords.

how to write properties file for birt reports?

I have multiple BIRT reports that obtains the data from the same jdbc data source.
Is it possible to obtain the conection parameters (Driver URL, User Name, and Password) from an external property file or similar?
Please give one example for it?
It is possible to create common connection in the library and use it in reports.
Step by step:
Create library: File -> New -> Library
In the Outline view create new Data Source the same way as you create report data source
For all reports:
Open report
In the Resources view find your newly created Data Source
Right-click Data Source and choose add to report
Switch Data Sets to Data Source from library
Due to #343527 you have to be carefull when editing reports referencing library conections. Correctly referenced connection (Data Source) has mini-icon that looks like a small blue chain. If connection data is altered locally, it has also yellow mini-icon looking like (hmm..) a small pencil. When you see it, open report XML Source, find <oda-data-source> tag and delete all its children.