Skip to content

Commit

Permalink
Update connector to use Looker JDBC driver
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbanghart committed Sep 14, 2023
1 parent 81af59a commit 7bcf44c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions connector/tableau/looker-jdbc/connectionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
* source. See manifest.xml.
*/
(function dsbuilder(attr) {
var urlBuilder = "jdbc:avatica:remote:url=https://" +
attr[connectionHelper.attributeServer] +
":" + attr[connectionHelper.attributePort] +
"/jdbc/;serialization=JSON";
return [urlBuilder];
var urlBuilder = "jdbc:looker:url=https://" +
attr[connectionHelper.attributeServer];

if (attr[connectionHelper.attributePort]) {
urlBuilder = urlBuilder + ":" + attr[connectionHelper.attributePort];
}

return [urlBuilder + ";serialization=JSON"];
})

2 changes: 1 addition & 1 deletion connector/tableau/looker-jdbc/connectionFields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</selection-group>
</field>

<field name="port" label="Port" value-type="string" category="endpoint" default-value="57198" />
<field name="port" label="Port" value-type="string" category="endpoint" optional="true" default-value="" />

<field name="username" label="Username" value-type="string" category="authentication">
<conditions>
Expand Down
2 changes: 1 addition & 1 deletion connector/tableau/looker-jdbc/connectionProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
} else if (authAttrValue == "oauth") {
props["token"] = attr["ACCESSTOKEN"];
}
props["serialization"] = "PROTOBUF";
props["database"] = ""; // attr[connectionHelper.attributeDatabase];
props["schema"] = attr[connectionHelper.attributeSchema];
// props["verifySSL"] = "false" // Uncomment me for local testing
return props;
})

0 comments on commit 7bcf44c

Please sign in to comment.