Compare commits

...

6 Commits

Author SHA1 Message Date
Claire Kuang ec28ccc5b9 updated object query
updates object query to handle commit obj id vs commit children object id
2021-09-13 15:46:46 +01:00
Matteo Cominetti e00405a9ea Update README.md 2021-09-08 13:45:30 +01:00
Alan Rynne e2ae247adb Updated Readme with new template 2021-09-03 18:13:47 +02:00
Alan Rynne ec7d8b8523 fix(readme): Added missing step to run connector 2021-08-26 10:42:44 +02:00
Alan Rynne be464864b6 fix(logo): Added all logo sizes 2021-08-26 09:51:22 +02:00
Alan Rynne 11b8833256 fix(ui): Modified auth labels for clarity 2021-08-25 16:18:08 +02:00
14 changed files with 94 additions and 33 deletions
+2
View File
@@ -332,3 +332,5 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
**/.DS_Store
+52 -13
View File
@@ -1,24 +1,51 @@
# Speckle QGIS: The Speckle 2.0 PowerBI Connector
<h1 align="center">
<img src="https://user-images.githubusercontent.com/2679513/131189167-18ea5fe1-c578-47f6-9785-3748178e4312.png" width="150px"/><br/>
Speckle | PowerBI
</h1>
<h3 align="center">
Data Connector for Microsoft's PowerBI platform
</h3>
<p align="center"><b>Speckle</b> is the data infrastructure for the AEC industry.</p><br/>
[![Twitter Follow](https://img.shields.io/twitter/follow/SpeckleSystems?style=social)](https://twitter.com/SpeckleSystems) [![Community forum users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fdiscourse.speckle.works&style=flat-square&logo=discourse&logoColor=white)](https://discourse.speckle.works) [![website](https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square)](https://speckle.systems) [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/)
<p align="center"><a href="https://twitter.com/SpeckleSystems"><img src="https://img.shields.io/twitter/follow/SpeckleSystems?style=social" alt="Twitter Follow"></a> <a href="https://speckle.community"><img src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&amp;style=flat-square&amp;logo=discourse&amp;logoColor=white" alt="Community forum users"></a> <a href="https://speckle.systems"><img src="https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square" alt="website"></a> <a href="https://speckle.guide/dev/"><img src="https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&amp;logo=read-the-docs&amp;logoColor=white" alt="docs"></a></p>
<p align="center"></p>
<details>
<summary>What is Speckle?</summary>
# About Speckle
Speckle is the Open Source Data Platform for AEC. Speckle allows you to say goodbye to files: we give you object-level control of what you share, infinite versioning history & changelogs. Read more on [our website](https://speckle.systems).
What is Speckle? Check our ![YouTube Video Views](https://img.shields.io/youtube/views/B9humiSpHzM?label=Speckle%20in%201%20minute%20video&style=social)
</details>
### Features
## Introduction
- **Object-based:** say goodbye to files! Speckle is the first object based platform for the AEC industry
- **Version control:** Speckle is the Git & Hub for geometry and BIM data
- **Collaboration:** share your designs collaborate with others
- **3D Viewer:** see your CAD and BIM models online, share and embed them anywhere
- **Interoperability:** get your CAD and BIM models into other software without exporting or importing
- **Real time:** get real time updates and notifications and changes
- **GraphQL API:** get what you need anywhere you want it
- **Webhooks:** the base for a automation and next-gen pipelines
- **Built for developers:** we are building Speckle with developers in mind and got tools for every stack
- **Built for the AEC industry:** Speckle connectors are plugins for the most common software used in the industry such as Revit, Rhino, Grasshopper, AutoCAD, Civil 3D, Excel, Unreal Engine, Unity, QGIS, Blender and more!
### Try Speckle now!
Give Speckle a try in no time by:
- [![speckle XYZ](https://img.shields.io/badge/https://-speckle.xyz-0069ff?style=flat-square&logo=hackthebox&logoColor=white)](https://speckle.xyz) ⇒ creating an account at our public server
- [![create a droplet](https://img.shields.io/badge/Create%20a%20Droplet-0069ff?style=flat-square&logo=digitalocean&logoColor=white)](https://marketplace.digitalocean.com/apps/speckle-server?refcode=947a2b5d7dc1) ⇒ deploying an instance in 1 click
### Resources
- [![Community forum users](https://img.shields.io/badge/community-forum-green?style=for-the-badge&logo=discourse&logoColor=white)](https://speckle.community) for help, feature requests or just to hang with other speckle enthusiasts, check out our community forum!
- [![website](https://img.shields.io/badge/tutorials-speckle.systems-royalblue?style=for-the-badge&logo=youtube)](https://speckle.systems) our tutorials portal is full of resources to get you started using Speckle
- [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=for-the-badge&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/) reference on almost any end-user and developer functionality
![Untitled](https://user-images.githubusercontent.com/2679513/132021739-15140299-624d-4410-98dc-b6ae6d9027ab.png)
# Repo structure
This repo is the home to our Speckle 2.0 PowerBI project. The [Speckle Server](https://github.com/specklesystems/Server) is providing all the web-facing functionality and can be found [here](https://github.com/specklesystems/Server).
## Documentation
Comprehensive developer and user documentation can be found in our:
#### 📚 [Speckle Docs website](https://speckle.guide/dev/)
## Install
Go to the [Releases](https://github.com/specklesystems/speckle-powerbi/releases) page, downlad the `.mez` file of the latest release and copy it into the following folder in your computer:
@@ -27,6 +54,14 @@ Go to the [Releases](https://github.com/specklesystems/speckle-powerbi/releases)
YOUR_USER_FOLDER\Documents\Power BI Desktop\Custom Connectors\
```
### Allow custom extensions to run
Go to `Settings -> Security -> Data Extensions` and activate the following option:
![Allow extensions to run](https://user-images.githubusercontent.com/2316535/130931149-074cf6a8-1910-41f1-99c7-b8b08168f473.png)
### Checking the connector is loaded
Now open PowerBI and you should see `Speckle (beta)` appear in the data source.
![PowerBI](https://user-images.githubusercontent.com/2316535/129580913-02e5e662-f344-419c-9894-e97055930c58.png)
@@ -35,6 +70,10 @@ Now open PowerBI and you should see `Speckle (beta)` appear in the data source.
> More detailed instructions on how to use the connector will be added shortly!
### Current limitations
Chunked data currently is not automatically de-chunked when received, we are aware of this limitation and are working to resolve it!
## Developing & Debugging
We encourage everyone interested to debug / hack / contribute / give feedback to this project.
+24 -7
View File
@@ -39,18 +39,36 @@
<Compile Include="Speckle.pq">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo16.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo20.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo24.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo32.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo40.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo48.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo64.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="SpeckleLogo80.png">
<SubType>Code</SubType>
</Compile>
<Compile Include="resources.resx">
<SubType>Code</SubType>
</Compile>
<Content Include="Speckle.query.pq">
<SubType>Code</SubType>
</Content>
<Content Include="Speckle16.png">
<SubType>Content</SubType>
</Content>
<Content Include="Speckle32.png">
<SubType>Content</SubType>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<UsingTask TaskName="BuildExtension" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
@@ -77,7 +95,6 @@
]]></Code>
</Task>
</UsingTask>
<Target Name="BuildExtension" DependsOnTargets="ExtensionClean">
<ItemGroup>
<PQFiles Include="@(Compile)" Condition="'%(Extension)' == '.pq'" />
+16 -13
View File
@@ -50,7 +50,7 @@ Speckle.GetBranchAsList = (branchRecord) =>
*/
[DataSource.Kind="Speckle", Publish="Speckle.Publish"]
shared Speckle.Contents = Value.ReplaceType(CommitTable, type function (url as Uri.Type) as any);
shared Speckle.Contents = Value.ReplaceType(CommitTable, type function (StreamUrl as Uri.Type) as any);
shared CommitTable = (url) as table =>
let
@@ -63,7 +63,7 @@ shared CommitTable = (url) as table =>
objectId = if (List.Count(segments) = 4 and segments{2} = "objects" ) then segments{3} else null,
commitTable = if (commitId <> null) then Speckle.GetObjectFromCommit(server, streamId, commitId)
else if (objectId <> null) then Speckle.GetObjectFromObject(server, streamId, objectId)
else if (objectId <> null) then Speckle.GetObjectFromObject(server, streamId, objectId, false)
else if (branchName <> null) then #table( { "Error" }, { { "Invalid URL, use a stream or commit or object url" } } ) // currently not implemented, see reason below
else Speckle.GetObjectFromStream(server, streamId)
in
@@ -84,7 +84,7 @@ Speckle.GetObjectFromStream = (server, streamId) =>
),
#"JSON" = Json.Document(Source),
objectId = #"JSON"[data][stream][branch][commits][items]{0}[referencedObject],
objectsTable = Speckle.GetObjectFromObject(server, streamId, objectId)
objectsTable = Speckle.GetObjectFromObject(server, streamId, objectId, true)
in
objectsTable;
@@ -122,12 +122,14 @@ shared Speckle.GetObjectFromCommit = (server, streamId, commitId) =>
),
#"JSON" = Json.Document(Source),
objectId = #"JSON"[data][stream][commit][referencedObject],
objectsTable = Speckle.GetObjectFromObject(server, streamId, objectId)
objectsTable = Speckle.GetObjectFromObject(server, streamId, objectId, true)
in
objectsTable;
Speckle.GetObjectFromObject = (server, streamId, objectId) =>
Speckle.GetObjectFromObject = (server, streamId, objectId, IsCommitObject) =>
let
query = if (IsCommitObject) then "{""query"": ""query { stream( id: \"""&streamId&"\"" ) { object (id: \"""&objectId&"\"") { children { objects { data } } } } }""}"
else "{""query"": ""query { stream( id: \"""&streamId&"\"" ) { object (id: \"""&objectId&"\"") { data } } }""}",
Source = Web.Contents(
Text.Combine({server, "graphql"}, "/"),
[
@@ -135,11 +137,12 @@ Speckle.GetObjectFromObject = (server, streamId, objectId) =>
#"Method"="POST",
#"Content-Type"="application/json"
],
Content=Text.ToBinary("{""query"": ""query { stream( id: \"""&streamId&"\"" ) { object (id: \"""&objectId&"\"") { children { objects { data } } } } }""}")
Content=Text.ToBinary(query)
]
),
#"JSON" = Json.Document(Source),
objects = #"JSON"[data][stream][object][children][objects],
objects = if (IsCommitObject) then #"JSON"[data][stream][object][children][objects]
else {#"JSON"[data][stream][object][data]},
objectsTable = Table.FromRecords(objects)
in
objectsTable;
@@ -149,11 +152,11 @@ Speckle = [
Authentication = [
Key = [
KeyLabel="Personal Access Token",
Label = "Speckle Token"
Label = "Private stream"
],
// UsernamePassword = [],
// Windows = [],
Implicit = []
Implicit = [
Label = "Public stream"
]
],
Label = Extension.LoadString("Speckle Connector")
];
@@ -169,8 +172,8 @@ Speckle.Publish = [
];
Speckle.Icons = [
Icon16 = { Extension.Contents("Speckle16.png") },
Icon32 = { Extension.Contents("Speckle32.png") }
Icon16 = { Extension.Contents("SpeckleLogo16.png"), Extension.Contents("SpeckleLogo20.png"), Extension.Contents("SpeckleLogo24.png"), Extension.Contents("SpeckleLogo32.png") },
Icon32 = { Extension.Contents("SpeckleLogo32.png"), Extension.Contents("SpeckleLogo40.png"), Extension.Contents("SpeckleLogo48.png"), Extension.Contents("SpeckleLogo64.png") }
];
// copy and pasted function from microsoft docs since it's not included yet in M standard lib
Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB