Azure Data Factory Connect to AWS RDS PostgresSQL Via SSH - postgresql

In the past I could successfully connect to an AWS RDS PostgresSQL database from Azure Data Factory that has been enabled with a public endpoint.
Recently we have a scenario where an SSH client is created on an bastion host on AWS EC2 Instance which then connects the PostgresSQL database.
So now we need to connect to this PostgresSQL instance from Azure Data Factory via SSH. It seems that the current driver (ODBC PostgreSQL Wire Protocol driver) in ADF only supports SSL, so is there another way to set up an SSH tunnel in Azure and connect via the tunnel to the SSH client in AWS.
So in short :
AZURE ADF ----> PostgresSQL Linked Service ---> SSH Tunnel ---> AWS EC2 SSH --> AWS RDS PostresSQL
Thanks in Advance ....

I dont think you can achieve this at this as it is not supported . I request you to go here and log this ask , so that the ask reaches to the right team .

Related

Connect Postgres db hosted in azure storage using docker

I am trying to connect the postgres database hosted in azure storage account from within the flyway, flyway is running as docker image in docker container
docker run --rm flyway/flyway -url=jdbc:postgresql://postgres-azure-db:5432/postgres -user=user -password=password info but I am getting the error ERROR: Unable to obtain connection from database
Any idea/doc-link would be helpful
You have a similar error (different context, same general solution) in this flyway issue
my missing piece for reaching private Cloud SQL instances from private worker pools in Cloud Build was a missing network route.
The fix is ensuring the Service Networking VPC peer has the "Export custom routes" setting enabled, and that the Cloud Router advertises the route.
In your context (Azure), see "Quickstart: Use Azure Data Studio to connect and query PostgreSQL"
You can also try with a local Postgres instance first, and Azure Data Studio, for testing.
After exploring few option, I implemented the flyway using the Azure container instance. Create an ACI to store the flyway docker image and to execute the commands inside ACI, Also created a file share to keep the config file and sql scripts.
All these resource (Storage, ACI, file share) I created via the terraform scripts which is being triggered from Jenkins.

Azure Data Factory - copy data from PostgreSQL on VM

I am trying to pull data from Postgresql on Azure using Azure Data Factory but have no luck. Both ADF and VM are in the same Azure Vnet.
In my VM networking settings I allowed port 5432 inbound access from ADF to VirtualNetwork. Similar outbound vnet to vnet.
I also installed ODBC driver on VM and added it to firewall.
I installed also the selfhosted integration runtime on VM which connects to ADF.
When creating a new Linked Service on ADF I chose PostgreSQL as source.
Not able to establish connection though.
Tried different settings:
-IP and DNS as servername
-self hosted and auto resolve integration runtime
-public and private IP
-no encryption and encryption
-temporarily turned off firewall on vm to test
still no success.
What am I missing?
password and database names are correct.
The error message I am getting when testing connection:
Error code
9603
Details
ERROR [08001] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Connection refused. Verify Host Name and Port Number.
ERROR [HY000] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Can't connect to server on 'xx.xxx.xxx.xx'
I would appreciate it if anyone could help.
Thank you
I found the solution. I need to use the ODBC connector as a linked service on ADF, not the PostgreSQL connector. Bingo!

PowerBI Connection RDS Postgres SSH

I would like to connect PowerBI to a PostgreSQL database hosted on AWS RDS secured by an SSH Tunnel.
I tried to create a connexion on my laptop with PowerBI installed through Putty and then create a Postgres connexion on PowerBI.
No problem to create the SSH connexion with Putty but PowerBI is not able to create the connexion with the database.
Is there a way to access this database with PowerBI ?
Process I followed :
Configuration of the destination :
Add the private key (I transformed it from RSA to .ppk with Puttygen)
Configure connexion
Configure Connexion >> Data
Configure Tunnel
Clik on "open", then a terminal will open :
Open PowerBi desktop, add a postgreSQL data source, Name= localhost and database = postgres

Not able to connect to azure postgres db from azure data factory when SSL is enabled

I'm new to Azure Data factory and i'm trying to create data set that connects to azure postgres db where SSL is enabled, but i get the below error, any idea how to solve this error without disabling SSL on postgres.
when i try to add sslmode=Allow to connection parameters, i get this error
You need to select EncryptionMethod option in link service. As MSDN shows,
Update:
I haven't met your error. I can connect successfully via integration run time.
The following is my setting, you can have a try.
In Azure Database for PostgreSQL:
Link service:

Connect AWS Athena to Postgres SQL

I need to connect AWS Athena (which is binded to AWS s3 bucket) to a Postgres SQL database.
I have tried to connect with Tableau and PowerBI successfully (following the instructions in documentation) and the result was successful.
I think that I need to use the JDBC connector already installed on my machine and try to create a server in Postgres, but I cannot see any option in pgadmin in order to connect AWS athena to the server.
Any ideas?
Thank you in advance!