Jump to content
Changes to the Jaspersoft community edition download ×

Two Datasources utilizing one Domain


jwebber
Go to solution Solved by elizam,

Recommended Posts

In our environment we are looking to pull data from two datasources (running on the same server or possibly different servers) but are both identical in regards to their tables ( = they can use the same domain). Is there an easy approach to this?  I've attempted to achieve this using a virtual datasource, but I then have to go through and create a 'custom' domain for the tables in each datasource, even though they are identical, this has thus far given me some trouble since their names are identical.

Any suggestions? 

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

In takign the route of using a Virtual DataSource I have to create derived tables for each table ( we have a lot of tables) since they are identical it just becomes redundant. Is there any easy method to bypass this?
Link to comment
Share on other sites

I'd imagine we could combine the data. Since our fields would allows us to filter out the data between the two databases. However, the latter would be preferred overall.

I'll add the domains are identical to the letter. In most scenarios laid out in the guides, this isn't the case. Just wondering if a there is an alternative method for our scenario.

 

Link to comment
Share on other sites

That's what I thought. What you might try is:

 

1. Make two JRS datasources, with the two different database connections. give them different names, like Thing1 and Thing2

 

2. Make your domain for one datasource, say Thing1, with all your joins and derived tables.

 

3. Export the domain, which creates an XML file you can edit.

 

4. Edit the file and replace Thing1 with Thing2.

 

I would test this with a vanilla domain first, before you've done all your work, just to make sure you can do it. There may be many instances of Thing1, but in a text editor it is a global replace.

 

5. Upload the file as a new domain.

 

There may also be a way to do this using custom datasources, but once I've said that, I've said all I know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...