Update actions from one sql table to another using Message Broker - ibm-mq

i wanna use Wepshoere Message Broker to get the actions that any user perform on any table to be applied on another table
Example
1- User insert a record on Table x in TestDB
2- Message broker take this newly added record and add it to Table y in TestDB
could you support me with detailed information. and thanks in advance

I suggest you instead add an insert trigger to Table x, this is a normal function for database triggers.
It would help if you update your question with the DBMS and OS you are using.

You could approach this using a dbInput node to fire a message when the table is updated and then use normal ESQL or the mapping node to do the insert in the target table.
The key thing is going to be configuring your db input node correctly, you can get more info on how to do that here:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/bc34041_.htm

Related

How can i capture data change of one table in oracle and post changed information to one web service intermediately

I have an account table in oracle, in this table has balance column, how can i capture a change of this column and post new value to one endpoint ws intermediately
Thanks a lot
Have you tried doing this with an AFTER UPDATE TRIGGER?
Oracle has a UTL_HTTP package which you can use within the trigger to make a webservice call.
The code here can be a good starting point

Laravel Migration create table from existing table

I am working on such application where table audit should perform to make revision of updated records. Let's say for example I have to log each field update in Users update.
I wants to create clone of existing user table by
CREATE TABLE users_audit LIKE users;
My main question is,
Is there any alternative way or provision in Laravel migration to create table from existing table ?
I know we can run raw sql query in migration up/down method using \DB::raw();
But it would be helpful if any helper function available to create table from existing table like, create or table
Yes, you can, see the below link
Click this link
This statement is used to execute raw queries
DB::statement('CREATE TABLE tablename LIKE existingtablename');

informatica execute sql in sql transformation

Background: I am really new. Informatica Developer for PowerCenter Express Version: 9.6.1 HotFix 2
I want to execute a t-sql statement as one step in a work flow:
truncate table dbo.stage_customer
I tried create a mapping, add a sql transformation on it. Input above query in sql query window. I added the mapping to a workflow of just start, the mapping, and the end. When I validate the flow I got this error:
The group [Input] in transformation xxx must have at least one port
I have no idea what ports are needed since this (the truncate statement) basically doesn't need input or output.
Use your query " truncate table dbo.stage_customer" in Pre-SQL command
As Aswin suggested use the built in option in the session property.
But in the production environments user may not have truncate table access for the table in a database. In this case, informatica workflow will fail if you check the truncate target table option. It is good to have a stored procedure to truncate the target table and use that stored procedure in informatica mapping to avoid workflow failures in case of user having no truncate access to the database.
if you would like to truncate a target table before loading why don't you use the in-built option present in session properties?
goto workflow manager-> open session->mapping tab->click on target table listed left side->choose the property "Truncate table option" just enable it
to answer you question, I think you have to connect at least one input and output port into SQL transformation (because it is not unconnected). Just create dummy ports and try again
try this article - click here

oracle query talend etl

I am a beginner to use talend etl I would make a request to select a database oracle then make a change _ S and insert it into a mysql table I'm stuck. I have not found how to make select queries with talend not know how I started that can help me please
To make a select on Oracle schema you need a tOracleInput component instance. You need to specify a Oracle connection (either a builtin connection or a repository-registered connection) and the output schema (the columns you need).
Then, click on "Guess query" to build the select SQL code accordingly to your desired output schema. You can then modify the automatically generated SQL code to fit your needs (ie. add WHERE or SORT clauses). Don't forget that output schema and selected columns must be the same (ie if you add a SQL-generated column inside the select clause you must add in your output schema, too). Any valid SELECT syntax can be used here (including subselects, cursors, window over partition and even more weird oracle stuff).
After the input instance, add a tMap where you make all your data manipulations. Finally, close with a tMySqlOutput, specifing connection and output table details. The flow will trivially looks like:
tOracleInput ----> tMap ----> tMySqlOutput
Create the connection Mysql and Oracle in Metadata Objects (Db Connections).
Create the following objects (tMySqlConnection - TOracleConnection)
Configure the objects with the parameters connections (Property Type: Repository).
Extract data: You can select the table with the object tOracleInput.
Edit schema of the table in the submenu Component
Create object TMAP, (transform the data)
Create object tMysqlOutPut and configure the schema and columns to insert.
Create object tMysqlCommit and close the connection.
Listo! ¡¡Run to job!! :)

Cassandra JDBC interface

I am trying to perform crud database operations on cassandra database,but eventually I came across a problem that cassandra jdbc driver requires predefined column family defination in the database, created using create columnfamily cql command.
More over the insert statement also fails if I try to insert a new column-value , other then specified in earlier create columnfamily statement.
I want to know if it is an usual behaviour or something going wrong.
Any help will be appreciated.
As you are using cql,You have to first create the column definition .On second half It seems problem because it is possible to insert any key value at any time whether it is defined or not.
can you show code here so that i can trace the problem

Resources