diff --git a/sql-odbc/docs/user/img/pbi_connection_string_options.png b/sql-odbc/docs/user/img/pbi_connection_string_options.png index 57b763a856..6cc19c61f1 100644 Binary files a/sql-odbc/docs/user/img/pbi_connection_string_options.png and b/sql-odbc/docs/user/img/pbi_connection_string_options.png differ diff --git a/sql-odbc/docs/user/img/pbi_error_conn.png b/sql-odbc/docs/user/img/pbi_error_conn.png index 87f908a397..261999ab80 100644 Binary files a/sql-odbc/docs/user/img/pbi_error_conn.png and b/sql-odbc/docs/user/img/pbi_error_conn.png differ diff --git a/sql-odbc/docs/user/img/pbi_gateway_connector_path.png b/sql-odbc/docs/user/img/pbi_gateway_connector_path.png new file mode 100644 index 0000000000..2a391372ad Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_gateway_connector_path.png differ diff --git a/sql-odbc/docs/user/img/pbi_gateway_status.png b/sql-odbc/docs/user/img/pbi_gateway_status.png new file mode 100644 index 0000000000..c7f4272ad6 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_gateway_status.png differ diff --git a/sql-odbc/docs/user/img/pbi_publish_report.png b/sql-odbc/docs/user/img/pbi_publish_report.png new file mode 100644 index 0000000000..a04e66aeb1 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_publish_report.png differ diff --git a/sql-odbc/docs/user/img/pbi_publish_status.png b/sql-odbc/docs/user/img/pbi_publish_status.png new file mode 100644 index 0000000000..8978c94860 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_publish_status.png differ diff --git a/sql-odbc/docs/user/img/pbi_select_workspace.png b/sql-odbc/docs/user/img/pbi_select_workspace.png new file mode 100644 index 0000000000..8d89fe3073 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_select_workspace.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_cluster_setting.png b/sql-odbc/docs/user/img/pbi_service_cluster_setting.png new file mode 100644 index 0000000000..210f4c37ba Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_cluster_setting.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_data_source.png b/sql-odbc/docs/user/img/pbi_service_data_source.png new file mode 100644 index 0000000000..dbee689ec0 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_data_source.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_data_source_success.png b/sql-odbc/docs/user/img/pbi_service_data_source_success.png new file mode 100644 index 0000000000..aa33429a96 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_data_source_success.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_dataset_gateway.png b/sql-odbc/docs/user/img/pbi_service_dataset_gateway.png new file mode 100644 index 0000000000..ce739a5fd9 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_dataset_gateway.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_dataset_refresh.png b/sql-odbc/docs/user/img/pbi_service_dataset_refresh.png new file mode 100644 index 0000000000..4170494d8a Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_dataset_refresh.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_dataset_refresh_history.png b/sql-odbc/docs/user/img/pbi_service_dataset_refresh_history.png new file mode 100644 index 0000000000..3810003117 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_dataset_refresh_history.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_edit_reoprt.png b/sql-odbc/docs/user/img/pbi_service_edit_reoprt.png new file mode 100644 index 0000000000..0e8aff6a63 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_edit_reoprt.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_modified_report.png b/sql-odbc/docs/user/img/pbi_service_modified_report.png new file mode 100644 index 0000000000..098485fba7 Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_modified_report.png differ diff --git a/sql-odbc/docs/user/img/pbi_service_setting.png b/sql-odbc/docs/user/img/pbi_service_setting.png new file mode 100644 index 0000000000..574aba671d Binary files /dev/null and b/sql-odbc/docs/user/img/pbi_service_setting.png differ diff --git a/sql-odbc/docs/user/power_bi_service_support.md b/sql-odbc/docs/user/power_bi_service_support.md new file mode 100644 index 0000000000..46edbf01bd --- /dev/null +++ b/sql-odbc/docs/user/power_bi_service_support.md @@ -0,0 +1,82 @@ +# Connecting Open Distro For ElasticSearch to Microsoft Power BI Service + +## Setup +* Download and Install [On-premises data gateway](https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-install) +* Change the path for custom data connector folder in On-premises data gateway so that the gateway can find the custom connector. +> NOTE: Ensure the gateway service account (**PBIEgwService**) has permissions to access the custom connector folder. Alternatively, you can copy connector file to `C:\Windows\ServiceProfiles\PBIEgwService\Documents\Power BI Desktop\Custom Connectors\`. + + + +* Verify the status of data gateway is ready to be used. + + + +* Login to Power BI Service. +* Click on **Setting** > **Manage Gateway**. + + + +* Select **Allow user's custom data connectors to refresh through this gateway cluster(preview)**. Click on **Apply**. + + + +* Click on **Add data sources to use the gateway**. +* Select Data Source Type as **Open Distro For Elasticsearch**. +* Enter Data Source Name and Server values. +* Select required **Authentication Method**. Select **Anonymous** for auth **NONE**. +For **AWS_SIGV4**, select **Key** and set aws access credentials for user **PBIEgwService** at path `C:\Windows\ServiceProfiles\PBIEgwService\.aws\` + +* Select Encryption mode for connection. +* Click on **Add**. + + + +* You will get a **Connection Successful** message. + + + + +## Publish Report + +* Follow [instructions](./power_bi_support.md) to create graph using Open Disto For Elasticsearch Data connector. +* Click on **Publish** to publish the report on Power BI service. + + + +* Select destination and click on **Select**. + + + +* You will get a success message when report is published. + + + +* Click on **Open '%report name%' in Power BI** to open published report in Power BI service. + +## Modify report using Power BI Service + +* Click on **Edit report** to modfify report. + + + +* Use **Filters**,**Visualizations** and **Fields** to modify report. + + + +## Dataset Scheduled Refresh + +* Click on **Settings** > **Datasets**. +* Select required Gateway and click on **Apply**. + + + +* Turn on Keep your data up to date option. +* Select refresh frequency and timezone. +* Add email for failure notifications if required. +* Click on **Apply**. + + + +* You can also check history by clicking on **Refresh history**. + + \ No newline at end of file diff --git a/sql-odbc/docs/user/power_bi_support.md b/sql-odbc/docs/user/power_bi_support.md index 4a2dcda292..9247cd0fd1 100644 --- a/sql-odbc/docs/user/power_bi_support.md +++ b/sql-odbc/docs/user/power_bi_support.md @@ -33,7 +33,7 @@ -* Enter host and port values. Click on **OK**. +* Enter server value. Click on **OK**. diff --git a/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq b/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq index c87995eb0e..b8612f4bc2 100644 --- a/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq +++ b/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq @@ -12,22 +12,17 @@ shared OdfeSqlOdbcPBIConnector.Contents = Value.ReplaceType(OdfeSqlOdbcPBIConnec // Wrapper function to provide additional UI customization. OdfeSqlOdbcPBIConnectorType = type function ( - Host as (type text meta [ - Documentation.FieldCaption = "Host", + Server as (type text meta [ + Documentation.FieldCaption = "Server", Documentation.FieldDescription = "The hostname of the Open Distro For Elasticsearch server.", - Documentation.SampleValues = { "localhost" } - ]), - optional Port as (type number meta [ - Documentation.FieldCaption = "Port", - Documentation.FieldDescription = "The port of the Open Distro For Elasticsearch server is running on.", - Documentation.SampleValues = { 9200 } + Documentation.SampleValues = { "localhost:9200" } ]) ) as table meta [ Documentation.Name = "Open Distro For Elasticsearch" ]; -OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table => +OdfeSqlOdbcPBIConnectorImpl = (Server as text) as table => let Credential = Extension.CurrentCredential(), AuthenticationMode = Credential[AuthenticationKind], @@ -61,21 +56,9 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = UseSSL = 0 ], - // Set host & port in connection string. - // Do not include port in connection string for aws server connection. - Server = - if Port <> null then - [ - Host = Host, - Port = Port - ] - else - [ - Host = Host - ], - ConnectionString = [ - Driver = "ODFE SQL ODBC Driver" + Driver = "ODFE SQL ODBC Driver", + Host = Server ], SQLGetInfo = Diagnostics.LogValue("SQLGetInfo_Options", [ @@ -123,7 +106,7 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = SupportsOdbcTimestampLiterals = true ]), - OdbcDatasource = Odbc.DataSource(ConnectionString & Server & CredentialConnectionString & EncryptedConnectionString, [ + OdbcDatasource = Odbc.DataSource(ConnectionString & CredentialConnectionString & EncryptedConnectionString, [ // Do not view the tables grouped by their schema names. HierarchicalNavigation = false, // Prevents execution of native SQL statements. Extensions should set this to true. @@ -154,7 +137,7 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = OnOdbcError = (errorRecord as record) => let ErrorMessage = errorRecord[Message], - ConnectionHostPort = errorRecord[Detail][DataSourcePath], + ConnectionServer = errorRecord[Detail][DataSourcePath], IsDriverNotInstalled = Text.Contains(ErrorMessage, "doesn't correspond to an installed ODBC driver"), @@ -168,7 +151,7 @@ OnOdbcError = (errorRecord as record) => if IsDriverNotInstalled then error Error.Record("", "The Open Distro For Elasticsearch SQL ODBC driver is not installed. Please install the driver") else if IsHostUnreachable then - error Error.Record("", "Couldn't reach server. Please double-check the host, port and auth.") + error Error.Record("", "Couldn't reach server. Please double-check the server and auth. " & ConnectionServer) else error errorRecord; @@ -178,10 +161,9 @@ OdfeSqlOdbcPBIConnector = [ TestConnection = (dataSourcePath) => let json = Json.Document(dataSourcePath), - Host = json[Host], - Port = json[Port] + Server = json[Server] in - { "OdfeSqlOdbcPBIConnector.Contents", Host, Port }, + { "OdfeSqlOdbcPBIConnector.Contents", Server }, // Authentication modes Authentication = [ diff --git a/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez b/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez index bfc01cea51..f7e2295ee7 100644 Binary files a/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez and b/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez differ