Steps to create dag in airflow by connecting to remote database - oracle

I am learning airflow and I have to create a dag that will connect to a remote oracle database and insert data from one table to another. Below is what I have done till now
After installation, ran pip install 'apache-airflow[oracle]' so that I can use oracle operator
Created connection string from UI to connect to remote database
Then I wrote my first dag but it didn't seem to run.
Before I try to find why it's not running, I want to make sure if I have to do some other steps that I may have skipped like some changes in airflow.cfg file especially in sql_alchemy_conn (this file I found in my home directory) or if cx_oracle is required to be installed so that I can connect to remote database or just connection string is needed (step 2 above).
There are so many things mentioned about airflow but yet not clear on the exact steps. If someone could help me in this that will be much appreciated. These might be the basics but I am stuck with what to do from end to end. Please help
Thank you!!

Related

A database on apex.oracle.com is to be connected to airflow

I have database on apex.oracle.com and I want to make a connection to airflow.
This answer didnt help me: How to Connect Airflow to oracle database
How to find the sid of my database?
I googled after alot of search I found a answer. Which was giving an error.
I executed this
grant select on v_$sql to username;
This gives an error:
ORA-00933: SQL command not properly ended
Please help me in complete detail if possible.
What should be entered in host name? I don't have any hosting platform. Should database need to be deployed or hostname can be found for a database created on apex.oracle
As far as I can tell (which doesn't have to be correct), give up. Database on apex.oracle.com isn't accessible from the outer world. As stated,
This site (apex.oracle.com) is intended only for the customer
evaluation of Oracle Application Express.
so - you should use it to test your Apex skills and nothing more. If you need to use a database, download and install your own copy - it is available on the Oracle Technology Network, free for evaluation purposes.
Or, consider contacting one of database hosting companies, if you want to access it on the Internet.

Getting error while talking to remote Oracle DB using Jenkins-CI

I am trying to connect to Oracle DB using Jenkins, I am trying to use the sqlplus-script-runner-plugin. Running into below issue
ERROR: ORACLE_HOME directory [/u01/app/oracle/product/11.2.0.4/db_1] does not exist!
Sample Screenshot from Jenkins Job
I even try to add the Jenkins user to ointsall group on remote Oracle DB server. Can any one help me finding the problem here.
I've to install Oracle XE to talk to remote DB servers, it solved my problem.

How to check connection of cassandra with pentaho data integrator

I'm trying to load data from Oracle table to Cassandra table by using Pentaho Data Integration 5.1(Community Edition). But I'm not getting whether connection has been established between oracle and cassandra. I'm using Cassandra 2.2.3 and Oracle 11gR2.
I've added following jars in lib folder of data-integration
--cassandra-thrift-1.0.0
--apache-cassandra-cql-1.0.0
--libthrift-0.6.jar
--guava-r08.jar
--cassandra_driver.jar
Please anyone can help me to figure out how to check whether connection has been established in Pentaho.
There are some ways to debug if a connection is established to a database, I don't know if all of them are valid for cassandra, but I'll add a especial one for that.
1) The test button
By simply clicking the test button on the connection edit screen.
2) Logs with high details may help
Another way to test is running you transformation with a high detail log:
sh pan.sh -file=my_cassandra_transformation.ktr -level=Rowlevel
3) The input preview
For cassandra, in especific, I would try just to create a simple read operation using Cassandra Input step and clicking in the 'preview' button.
4) The controlled output test
Or maybe you can try with a simplier transformation first, to make sure it's running fine. Eg.

can't start oracle service in windows

I'm taking DB prog. class and we are required to use Oracle+ Oracle sql dev. I so far I got 3 DB in oracle each with a connection from Oracle sql dev.
In windows services I only have one service called OracleDBConsole"MY1stDB name" there's no similiar services for the other DBs I created.
When I try to start this service I receive error as the picture
I can connect through the connections in Oracle sql dev. to the other DB I created except the 1st one
Does anybody have an idea on this issue
As one of affected people, I finally found solution:
If this appears, run lsnrctl start as an administrator to start the listener.
Most probably your listener.ova and tnsnames.ova are improperly set.
OK you installed 3 instances on same machine. There are two possibilities.
They are all set up to use default ports so when one is started no other can start due to port conflict. In that case you need to reconfigure ports following documentation
Second possibility is you already have different ports for your instances. In that case please check your connection definitions if they use proper ports. First will probably need default 1521 but others needs other ports. You may try 1522 as when during instalation 1521 was used it could took next free. But generally you should go to NETWORK/ADMIN/listener.ora edit file and check what port is used. Then properly define connection in client tool.
But as said in comments. Installing 3 instances make no sense unless you're trying to do some study with DBlinks simulations.
Mentioned service relates to oracle enterprise manager service.you have this because it configured for your database. but to troubleshoot it please check its logs in %ORACLE_HOME%**HOSTNAME_DBNAME**\sysman\log*. check there logs and send to investigate.
regards,
Mohsen
There is insufficient detail about the error to know what the problem is, however my guess is that subsequent instances are attempting to use the same resource as the already started instance, most likely the port.
Nevertheless, your problem can be solved by not creating multiple instances of Oracle, but rather creating multiple databases in the one Oracle instance.
It is a virtual certainty that your teacher did not intend you to start multiple instances of Oracle.

Pre-Installation Check Mantis: can't install

I am trying to install Mantis on my server. Problem is that I can't seem to get pass the Pre-Installation Check step. I click on "Install/Upgrade Database", and displays all "GOOD". Then it says:
Database Creation Suppressed, SQL Queries follow
<< here it prints a lot of sql queries, mainly create and alter tables >>. When I say this the first time, I went to MySQL Workbench, (the database bugtracker was already created), and ran the script given. Thereby, creating all the needed tables.
Then it says:
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
It checks a few more things (all with result "GOOD") and finally it displays this message:
Install was successful.
Continue to log into Mantis
The previous word "Continue" appears as a hyperlink leading to login_page.php. When I click it, it leads right back to this pre installation check page.
The thing is, the database is created! And the first time I encountered the sql queries I ran them, so the tables are indeed created.
Attempting to connect to database as admin GOOD
Attempting to connect to database as user GOOD
Checking Database Server Version
Running mysql version 5.5.25
My PHP version is 5.3.14.
The Mantis version i'm trying to install is 1.2.11.
Any ideas as in what it is I am doing wrong? Or any other piece of information I could provide?
I realize now that this is not the best place for this question. Nonetheless, in case someone else happens tu stumble across this, I wanted to let know the only workaround I could find was installing another Mantis version: 1.1.1. Very old, but it worked!

Resources