I want to create a event (event based trigger) in Microstrategy based on database query.
I want to trigger that event on particular dates that i have in my database Table,How should i do that?
One way would be
Create a unix/windows batch script containing sql query which looks if current date= date stored and execute a command manager script(micorstrategy) if condition is satisfied
Related
We are executing pipeline one by one in sequence manager and load the data on premise SQL.
but we would want to load the data all the copy activity in single trigger. which means we have to load the 15 tables data into on premise DB. if tomorrow, we have to add one more table, we should not change in pipeline. we would like dynamic table insert. kindly advise.
thanks to all
I reproduced the above scenario and got the below results.
Use two lookups one for your source database and one for on-prem SQL.
Here I have used Azure SQL database for both source and target. You can use your database with SQL Server linked service in lookup.
Use the below query in both lookups to get the list of tables.
SELECT TABLE_NAME
FROM
information_schema.tables;
lookup list of of source tables:
Give the same query in second lookup.
List of target tables with another lookup:
Use filter activity to get the list of new tables which are not copied to target.
Items: #activity('sql source lookup').output.value
Condition: #not(contains(activity('on-prem lookup').output.value,item()))
Filter result:
Give this Value array to a ForEach activity and use copy activity inside ForEach.
Copy Source:
Copy sink:
You can see new tables are copied to my target. Schedule this pipeline everyday so that your every new table gets copied to target.
Is there a way to query a DB table as a one time activity, so that the values can be used to drive a repeating pipeline activity.
Let's say I have a set of values that varies based on the environment(DEV/TEST/PROD). Instead of passing the values corresponding to the environment as parameters, can I configure these values in a DB table and read them the first time the Data Factory runs, so that a repeating Orchestrator task that runs every five minutes can fetch value obtained from the table?
You can use a Lookup activity for your case.
Specify your query in the Lookup activity to get the row you want to query for your environment value. You may also wants to check the "First row only" option for your case.
To access the value returned from DB, you can get the value from the output of the Lookup. It would be in the "firstRow" object of the output.
For the conditional/switch handling for your use case, put in #activity('Lookup config table').output.firstRow.VALUE for your expression in the Switch's dynamic content.
you can use lookup activity from azure data factory to query values from db and then use parameters to store them to use in next activities, please check this
I have been searching for the condition, where, lets say when we enable time travel to a certain table in DB2 , but don't want to capture all the updates done, but only the updates that's done by some specific user.
Wanted to know if this is at all possible with the DB2 time travel and how we can achieve it .
It's not possible with DB2 temporal tables.
Alter the temporal table add a user column maintained by system.
db2 for Iseries column shown
EMP_CHANGE_USER VARCHAR(18) GENERATED ALWAYS AS (USER)
The new column will go automatically to the history table of the temporal table. You can report on the history table and have emp_change user.
Note: IRL Don't single out users. You can give management a report that lists out all users and management can filter it down to individuals. Programmers do not single out users for reporting and logging.
I use SugarCE v 6.5.4 . I need to update the status of a database table field based on the
time condition in database table data . Check every 5 minutes for condition and if met Update status of table . How it can done ? please reply me with a solution.
Thanks,
Anes
You can join your suagrcrm DATABASE from the as400 or main tables with directly pass values in the any mySQL database.
Or another way to update manually from IMPORT in PHPMYADMIN.
You should set up a scheduler thats runs every 5min and that does the query and action you want. take a look at http://developers.sugarcrm.com/wordpress/2012/09/07/adding-your-own-reoccuring-jobs-to-the-scheduler/
Is there a quick way to find out when last change took place in some table?
EDIT:
I realize that i can add a column which will hold a change date, but i am wondering if there is some kind of metadata that can be accessed by EF. My db is hosted on SQL Server 2008.
Add a 'last updated' column to your table and query that one for the latest change.
Update: If that is not an option as per the update to the question, you could:
a) create a separate db table with table name and date/time and update that one with triggers on the table you want to track.
...or...
b) since you're using SQL Server 2008 you could possibly do something with SQL Server change tracking. There's no built-in support for change tracking in EF, but that doesn't prevent you from using it 'on the side'...