migueesc123 / WooCommerceConnector

A Power BI Custom Connector for WooCommerce
MIT License
31 stars 12 forks source link

Expanding the connector with other information #10

Closed gijsvanbeek closed 4 years ago

gijsvanbeek commented 5 years ago

Hello,

First of all thank you for this great custom connector! I'm using it for a while now, and also wondered many times if you will be expanding to other WooCommerce tables, like customers, products etc. i have recently expanded the connector so i can also read data from the customer table. If you are interested maybe we can share ideas?

Grtz Gijs WooCommerce_connector

migueesc123 commented 5 years ago

Hey!

The main reason behind this connector not having more fields is 3 fold:

The code could use some rework if you want it to be THE best code possible as my main goal with the first version was to simply get the orders and that was it.

I'm completely open to the idea of a pull / merge request. Just send it and I'll do my best to review the request as soon as I can.

gijsvanbeek commented 5 years ago

hello,

Thanks for the quick reply.

what do you mean exactly with that you can create the other tables with the current query? The query gives me all the fields of the orders, but (for example) only the Customer ID (not other information about the customer) So that's why i have changed your code to also get all other information about the customers (based on the customer Id of the order i can link it to the customer table)

One final question: Is the code based on incremental refresh? or always all the orders?

migueesc123 commented 5 years ago

You can expand the Billing / Shipping Fields and create a Customer table from it. Also, depending on how your WooCommerce is set up, some useful information could also be stored within the meta_data field, but it completely depends on how you use it.

In regards to incremental refresh, here's my take on it using this exact custom connector: https://www.poweredsolutions.co/2018/05/08/first-thoughts-on-power-bi-incremental-refresh/

karenjoconnell commented 5 years ago

Any chance the mez with the customers will be shared???

migueesc123 commented 4 years ago

Hey! I've added a new subscriptions function in the event that you have the woocommerce subscriptions plug in.

The repo is open to any pull / merge requests so if you wish to expand the connector, you can do so freely. I'll review the code submmitted as soon as i'm available.

gijsvanbeek commented 4 years ago

@Karenjoconnell this is the edited version with the customers table

WooCommerce.zip