Skip to content

Commit

Permalink
A fix to allow the connector to work with 4.0 MR2 of Neo4j
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Skardon committed Oct 8, 2019
1 parent 9f44699 commit ae3174a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Neo4jPowerBiConnector/Neo4j.pq
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ExecuteCypherImpl = (
optional port as nullable number) as table =>
let
_source = Web.Contents(Neo4j.DefaultUri(scheme, address, port), [
Headers = if Extension.CurrentCredential()[AuthenticationKind] = "Implicit" then null else DefaultRequestHeaders,
Headers = if Extension.CurrentCredential()[AuthenticationKind] = "Implicit" then ImplicitRequestHeaders else DefaultRequestHeaders,
Content = Neo4j.CypherToM(cypher)
]),
_json = Json.Document(_source),
Expand All @@ -77,7 +77,12 @@ in
// Generates the default request headers needed for Neo4j to work
//
DefaultRequestHeaders = [
#"Authorization" = "Basic " & Neo4j.Encode(Extension.CurrentCredential()[Username], Extension.CurrentCredential()[Password])
#"Authorization" = "Basic " & Neo4j.Encode(Extension.CurrentCredential()[Username], Extension.CurrentCredential()[Password]),
#"Content-Type"="application/json"
];

ImplicitRequestHeaders = [
#"Content-Type"="application/json"
];

//
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Neo4j DataConnector For PowerBi
# Neo4j DataConnector For Power BI

Pretty much what it says on the tin.

Expand All @@ -12,3 +12,7 @@ Pretty much what it says on the tin.
Under the 'Data Extensions' heading select the radio option of:
> (Not Recommended) Allow any extension to load without validation or warning
## Versions!

1.0 = Initial release
1.1 = Bug fix to get it working with Neo4j 4.0 MR2 (and probably onwards)

0 comments on commit ae3174a

Please sign in to comment.