www_fdw | fdw extension for postgres | SQL Database library
kandi X-RAY | www_fdw Summary
kandi X-RAY | www_fdw Summary
This library contains a PostgreSQL extension, a Foreign Data Wrapper (FDW) handler of PostgreSQL which provides easy way for interacting with different web-services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of www_fdw
www_fdw Key Features
www_fdw Examples and Code Snippets
Community Discussions
Trending Discussions on www_fdw
QUESTION
After several days of some progress, I am coming to terms with the fact I lack the knowledge, or level of skill, to put all of these pieces together and finish this project. Thus, I am appealing to, and grateful to, anyone who can help me out with this.
Technology
- CentOS 7.5
- Python 3.6.0
- Django 1.10.5
- PostreSQL 9.2
- Microsoft CRM Dynamics 365 online which has most current client data, thus have to use the Web API: https://msdn.microsoft.com/en-us/library/gg334767.aspx
Issue
- CRM has the most current client data in it and want to bring it into PostgreSQL to use for numerous things
- Want to use
www_fdw
since it is the only foreign data wrapper I have seen for PostgreSQL than can use Web API's: https://github.com/cyga/www_fdw/wiki - The Dynamics Web API uses OAuth2 and
www_fdw
does not support any type of authentication natively - Talked to the dev of
www_fdw
who recommended making a proxy server to handle the OAuth2 authentication with Microsoft - PostgreSQL with
www_fdw
would talk to the proxy, which would in turn send authentication to Microsoft culminating in the ability to treat the Web API as a Foreign Table so that it is treated like any other table
The three parts and what has been tried so far
Three parts = www_fdw
+ proxy server + OAuth2
...www_fdw
: I have setup using the following parameters based on this: https://github.com/cyga/www_fdw/wiki/Examples
ANSWER
Answered 2017-Mar-28 at 15:03Setting up the FDW in Step 1 looks okay to me.
Your Python script in Step 2 needs a shebang at the top. Otherwise it is treated as bash, so the first 3 lines run import(1)
and save screenshots to new files named http.server
, socketserver
, and urllib
. That keeps the script busy for a little while before it dies on the PORT
line. In the meantime (or even after it dies), running just curl http://localhost:12345
gives the same error as Postgres:
QUESTION
Microsoft Dynamics 365 CRM has most current client and company data and I need it for the internal database the frequently uses the data. Trying to replace duplicative databases where one is getting updated (CRM) and the other is not.
Because it is Office 365 and hosted in the cloud, we don't have access to the database, just are able to use the Web API. The Web API is over an HTTPS connection and requires login credentials.
One thought was to use a PostgreSQL FDW like www_fdw
, which is great except it accepts no options for login credentials. There does not appear to be alternatives.
So I am back to using Django, Python, and/or Javascript to get the JSON, de-serialize it, and import it into the database.
I do not need to display it in a Django template. Really, it just needs to come from CRM and go directly into the database. I am just not sure the best way to handle it.
For example, would the Django REST Framework make it easier than just using JavaScript and Python to request the Web API and de-serialize? From there, how is written to the database if it is bypassing Django?
...ANSWER
Answered 2017-Feb-18 at 06:42I suggest you create a logic app with a Dynamics 365 connector to PostgreSQL. There's a sample in the link below :
https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-crmonline
QUESTION
I want to use www_fdw extension of PostgreSQL in order to read data from web services. I used this command to create extension:
...ANSWER
Answered 2017-Feb-17 at 10:06The problem was solved when I installed mingw64 and msys. I compiled postgresql server in my machine and I used the:
build packages for www_fdw:
and copied the related folders in the related directories (bin, lib, share) in postgresql folder.
Thanks a-horse-with-no-name!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install www_fdw
If your response isn’t of xml type or you don’t plan to use xml parsing in response_deserialize_callback - don’t bother about it. Otherwise, in order to work with xml type (used in response_deserialize_callback) your installation has to support xml type. Usually it means building PostgreSQL with --with-libxml option. If you plan to use response_deserialize_callback for xml but with own parsing mechanism - your callback will be passed with text parameter.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page