I want to use the airflow 2.01 docker-compose file from apaches github.
here is the link docker-compose.yaml and here is the link to the dockerfiledockerfile
I want to use a Dag which should grab data out of my SQL Server database. Actually I get the following error:
no module named pymssql
After I manually installed it, I get an error like no module named pyodbc.
When I want to install this manually I get an gcc error, that it is not possible to install.
Does anyone have any clue about this?
Is there any docker-compose file which is able to handle SQL Server connection for Airflow 2?
Thanks in advance
Related
I am trying to connect Airflow with a Postgresql DB.
When in airflow.cfg I change the sql_alchemy_conn = spostgresql+psycopg2://127.0.0.1:5432/airflow, where airflow is the name of my DB which is installed on the same machine.
After updating the config file, I run airflow initdb and get the following error which I cannot understand:
File "/some_path/env/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 232, in load
"Can't load plugin: %s:%s" % (self.group, name)
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:spostgresql.psycopg2
I found this on the web, which seems to "solve" this problem, but the solution was not clear to me at all.
Can someone tell me what the problem is and how to solve it?
Looks to me like you have a typo in your sqlalchemy connection string (s at the beginning of postgres). Try changing:
spostgresql+psycopg2://127.0.0.1:5432/airflow
to
postgresql+psycopg2://127.0.0.1:5432/airflow
Im trying to connect a project to an MS SQL but I can't. I read a lot but no one answer helps me.
Now I´m trying with ADOdb with mssql driver but the connection answer is:
Missing extension for mssql
So I suppose I have to install it but I can't find how can do it for PHP 5.6 on Centos. Anyone?
Or maybe other way to reach the DB?
I already tried yum install php56-php-mssql, php56w-mssql but all of them are miss. And yum install php-mssql answer that package
is already installed
UPDATE
1) tsql test works
2) php-mssql connection in php also works WHEN RUN FROM THE SHELL
3) running PHP through apache does NOT work.
I found the mssql.so and added the path to my php.ini file, then restarted apache but when I load a page with phpinfo(), mssql.so doesn't show.
What is missing?
PROBLEM SOLVED
1) Download PHP5.6 source files.
2) go to php/ext/mssql
3) do phpize but with php used by Plesk located on /opt/plesk/php/5.6/bin/phpize
4) configure, make
5) copy generated *.so to extensions folder on /opt/plesk/php/5.6/lib64/php/modules
6) create /opt/plesk/php/5.6/etc/php.d/mssql.ini file with tho following text:
; Enable mssql extension module
extension=mssql.so
7) restart apache
First things first, I read and tried stuff I found online even from this website, but can't get it to work.
I have an SQL SERVER 2014 running on Windows Server 2012, there I have a WAMP 64 bits running Apache on PHP 7.1.6 and need to connect to the Database, apparently the extension is not loaded because I'm getting the undefined function error.
$conn = sqlsrv_connect( $APIDBSERVER, $connection);
What I've done so far:
Installed Microsoft® ODBC Driver 11 for SQL Server
Downloaded PHP SQL Driver 4.0 and moved php_sqlsrv_7_nts_x64.dll to /ext
Added them to php.ini:
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_sqlsrv_7_nts_x64.dll
Apparently the PDO also needs php_pdo.dll which WAMP doesn't have and I haven't found where to download it from, so I'm using the standard non-PDO approach
Recently even tried enabling odbc extensions which were disabled:
extension=php_odbc.dll
extension=php_pdo_odbc.dll
I access the php.ini through the WAMP menu so I know I'm editing the right one, restarted the server several times trying different things but I've run out of ideas.
Can you please help me?
EDIT:
PHP error log indicates the modules couldn't be found, but if I check that path they're right there, copy&pasted filenames into php.ini.
PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp64/bin/php/php7.1.6/ext/php_pdo_sqlsrv_7_nts_x64.dll' - The
specified module could not be found. in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp64/bin/php/php7.1.6/ext/php_sqlsrv_7_nts_x64.dll' - The
specified module could not be found. in Unknown on line 0
EDIT 2:
Tried downgrading to 7.0.20 and get the same error, so the php.ini is fine, it just won't load them for a reason, will try to download ODBC 13.1 maybe?
Each PHP version might require a different version of the Microsoft PHP Drivers for SQL Server.
The link below shows compatibility between PHP and MS SQLSRV versions:
https://learn.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15.
Because of the way WAMPServer is configures, NTS extensions do not run.
So change your process just a little and use the Thread safe dll's instead.
I'm learning how to build an application using Scala and the Play 2 Framemork. I`ve created a new project using the activator tool, based on "play-scala-intro" current template.
The template have a sample app using the Play-Slick 1.0 for managing dependencies and is configured with a H2 DB, that worked without problems.
When I tried to change to a Postgres DB, I'm running in trouble. I get an error 500, telling me:
"Cannot connect to database [default]".
In the stack trace, the exception is:
"Configured Slick driver org.postgresql.Driver is not an instance of
requested profile slick.profile.BasicProfile"
So... What I already did:
I added to my build.sbt file the dependency:
"org.postgresql" % "postgresql" % "9.4-1201-jdbc41"
In my configuration file (application.conf), the DB connection is configured as:
slick.dbs.default.driver=org.postgresql.Driver
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/hello_play"
slick.dbs.default.db.user="postgres" slick.dbs.default.db.password=""
PS: I've tried with slick.dbs.default.driver="org.postgresql.Driver" too...
PS2: My db password is empty. I'm connecting with PgAdmin without problems
slick.dbs.default.driver must be a slick driver, not a JDBC driver. Your db config should look something like this:
slick.dbs.default.driver="slick.driver.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/hello_play"
slick.dbs.default.db.user="postgres"
slick.dbs.default.db.password=""
I want to connect to Microsoft SQL server 2012 by using SOAP-UI. I have downloaded JTDS-JDBC jar (jtds-1.3.1 Executable Jar File) and store this SoapUI-PRo-5.0.0\bin\ext folder.
Now while writing groovy code by Data Source Step, which Driver should i select.
How can I confirm that this jar file is loaded successfully when soapui is start up.
Try net.sourceforge.jtds.jdbc.Driver() Did you see the documentation?
You should see a message in the soapui log, like:
INFO:Adding [C:\Program Files\SmartBear\soapUI-...\bin\ext\....jar] to extensions classpath