how to compare data using redgate data compare tool - mysql

i am trying to compare the data of two mysql databases using the redgate data compare tool for mysql. The tool identifies two databases with identical data as having different tables. How can i solve this?

I hope it will be work in redgate tool after creating a new project. and on Object Mapping tab ,
select an Unmapped table or view that you want to map from the source database.
Select the Unmapped table or view that you want to map from the target database.
Click Map.SQL Data Compare moves the tables or views to the upper pane.

Related

Querying data from 2 MySQL Databases to a new MySQL database

I want to query data from two different MySQL databases to a new MySQL database.
I have two databases with a lot of irrelevant data and I want to create what can be seen as a data warehouse where only relevent data should be present coming from the two databases.
As of now all data gets sent to the two old databases, however I would like to have scheduled updating so the new database is up to speed. There is a key between the two databases so in best case I would like all data to be present in one table however this is not crucial.
I have done similar work with Logstash and ES, however I do not know how to do it when it comes to MySQL.
Best way to do that is create a ETL process with Pentaho Data Integrator or any ETL tool. Where your source will be two different databases, in the transformation part you can remove or add any business logic then load those data into new database.
If you create this ETL you can schedule it once a day so that your database will be up to date.
If you want to do this without an ETL than your database must be in same host. Than you can just add database name just before table name in query. like SELECT * FROM database.table_name

Why are my parameters in Tableau slowing down processor? I am connected via Custom SQL Query via a View

I have an SQL Database (SQL Server 2008 r2) that I link to Tableau via a Custom SQL Query (connected to a view in SQL). Instead of adding the new fields in the SQL Database, I am creating calculated fields in Tableau. Thedata source connected to Tableau is a viewI created by joining other views (there is a pivot I join to the main table). I want to now add the parameters from tableau as new fields in SQL and remove them from Tableau since it is bogging the tool down. What do you recommend to be the best approach in this? I have never added fields to a view and curious how this can be achieved. All of the parameters work in tableau only via the custom SQL query (the view created), but would not if I created them from the main data table in SQL.. I hope this makes sense. Thank you so much for the help! Have a great day -p
its always a good practice to create all your required fields calculation in sql table which will improve your performance. and create a extract connection with your table instead of live.

Aggregate data and migrate them to another database

I'm new to Talend. I want to make a script that transform my data (using an sql query) from a database and insert them to an other one.
Could you help me please with the list of components that I should use ? any tutorial ?
Thank you
Talend has many database specific components. You will find input and output components for all databases. input components are those which enables you to read data from database and bring it to talend and output components are those which allows you to write/insert data to database.
for example if your source and target are both oracle then -
toracleinput will be for reading from oracle db - (you have to mention connection details, sql query and schema for this component).
toracleoutput will be for inserting this data back to oracle database table. Here again you have to mention connection details, target table name, type of operation etc..
finally you have to connect flow of data from input to output component and if you need any intermediate transformations, joins etc you have to user other talend components in between like tMap etc..

How to select all field in all tables from a MySQL in talend

I am looking for a way to select a full MySQL database in talend and use it as source to generate an XML.
Currently I'm trying with the tMysqlInput component but I can only select individual table. I've 10+ table and I want to rebuilt my data with several tMap. So I'm looking for a component or way to get the full database in one shot.
Thanks in advance for your help!
I would say that you need one tMysqlInput per table. That's the Talend logic.
What I suggest you to do :
Retrieve all table schemas using Talend
Drag & Drop the created schema to the Talend Designer and select tMysqlInput
Your newly tMysqlInput should already be set to use the corresponding schema (repository mode)
If you press "Guess query" in the tMysqlInput settings, it will list all columns
Depending on what you are trying to achieve, take a look at the tMysqlTableList https://help.talend.com/display/TalendOpenStudioComponentsReferenceGuide521EN/7.65+tMysqlTableList
EDIT
Talend can make JOINs directly in the tMap component. A good example can be found here : http://techblog.appirio.com/2009/12/performing-lookups-and-transformations.html

Tables from two different databases in a DBML?

After dragging two tables in from one database, I switch to another and drag a table in. Now I get a message if I want to replace the connection string with the new one. I want tables from multiple databases in one DBML. Is this possible?
It is entirely possible to reference multiple databases within the same DBML, PROVIDED those databases reside on the same SQL Server.
In Visual Studio, right-click on the DBML, click "Open with..." , and select XML (Text) Editor with Encoding.
You will see your first table that you dragged in looks like this:
<Table Name="dbo.MyTable1fromMyDatabase1" Member="MyTable1fromMyDatabase1">
For your tables from other databases you wish to add, enter them like this:
<Table Name="MyDatabase2.dbo.MyTable1fromMyDatabase2" Member="MyTable1fromMyDatabase2">
This will work assuming the same login works for both databases, and your LINQ expressions can now query across both databases!
I don't believe that what you're looking for is possible, since the DataContext would then not have any easy way of resolving results from two separate databases.
If you're looking to create domain objects from two separate databases, then your best bet would be to have two separate DBML's, then use a bridge (GOF) or some other related design pattern to instantiate your domain objects.
Another option is to create a server link on on database that points to the other and make aliases to the remote tables from the "local" DB. I believe then you'd be able to reference them as if they were all in the same database.
We can also create a view that queries the table in the other database. We can select, insert and update this view, which will affect the table in the other database as well.