Saturday, July 18, 2020

Sharing borrowed kindle library books with kids



  1. Borrow the book (I use Libby, and so after borrowing, need to make sure I click on deliver to Kindle).
  2. Once you have claimed the book and added it to your account,  and under account settings, click on manage "Content and Devices" (this should be the link https://www.amazon.com/hz/mycd/myx?_encoding=UTF8&ref_=ya_aw_mycd#/home/content/booksAll/dateDsc/)
  3. Click on the "..." Button next to your book
  4. Click on "Manage Family Library"
  5. Finally add it to your kids free time library.

Thursday, April 09, 2020

PowerBi - Attaching a Common Data Model Folder to a DataFlow - Error: path doesnt contain model.json

If you get the "The path doesn't contain model.json. Please provide the full path to the CDM folder including its definition file (its Model.json file) and try again." error, there can be many reasons for it.

Here are some things to try:

  1. Make sure your url doesnt contain blob.core.windows.net.

    1. When I used the desktop app StorageExplorer and copied the path to the model.json file, then the path looked like: https://xxxxxx.blob.core.windows.net/cds-crmuat1/model.json
    2. The same file, the path through Azure portal's storage explorer was: https://xxxxxx.dfs.core.windows.net/cds-crmuat1/model.json.
      The 2nd path worked, but the first one didnt.
  2. Make sure your permissions are correct:
    1. In the screen shot above, what I had missed were:
      1. Adding myself to the owner role on the storage account directly. Its not enough to be in here via inheritance, you need to add yourself directly.
      2. Also I had to add myself to the "Storage Blob Data Owner" role.
    2. The ones in blue are what the documentation asks you to do: https://docs.microsoft.com/en-us/power-bi/service-dataflows-connect-azure-data-lake-storage-gen2#grant-permissions-to-power-bi-services
Some other gotchas:
  1. The storage account used for CDM needs to be the exact same storage account used by PowerBi. As of writing this blog, this is a limitation of PowerBi that I hope they will remove.
  2. The storage account needs to be in the same tenant and also hosted in the same region as PowerBi.
  3. If you encounter an error when trying to save a DataFlow, make sure that there is a container/filesystem named PowerBi in that storage account.
Useful resources:


Wednesday, March 25, 2020

Dynamics CRM - Alternate key fails with message "The statement has been terminated."

If you get the unhelpful message that the "Statement has been terminated.":


Look to see if you have a duplicate value in your key. Unfortunately, if you have more than 50k records, you cannot use fetchXml and either would need to load the data into a database or filter the list by date-range (but the latter option is not guaranteed to catch all the errors and so the db option is your best bet).

Here is a query to find dups based on accountNumber on account entity
 
 
   
   
   
     
   

   
 



It used to be one time that CRM used to throw an error message stating the key creation failed because of a duplicate key. In the latest version, its a rather unhelpful message.


 

Friday, March 20, 2020

git@github.com: Permission denied (publickey).

If you get the error "git@github.com: Permission denied (publickey).", try using HTTPS:
Under clone or download, "use https" instead of "use SSH".

Tuesday, January 07, 2020

Restarting a web-app using Logic Apps

Unfortunately its not straight forward and the help wasnt very helpful. So here are the steps and the pages I had to look up for getting the data.
  1. Create a logic app and add whatever trigger you need. (I used a recurrence based trigger, but you could use a HTTP request, etc).
  2.  Add a new step and then look for Azure Resource Manager. Once you click on it, search for "Invoke" and pick the "Invoke Resource Operation" action.
  3. You will need to fill in the following parameters and here is how to find them:
  4. Subscription: This should be available in the drop-down. Else, its your subscription Id.
  5. Resource Group: The resource group in which your web-app resides
  6. Resource Provider: Microsoft.Web
    This I figured out from this page: Resource providers for Azure services
    Microsoft.Web because I needed to manage an App Service.
  7. Short Resource Id: this I figured out by going to the "Properties" section of my App Service and its the in the "ResourceId".

    The value will end up being something like "sites/xxxxxxx"
  8. Action Name: Lets look at this param before the ClientAPIVersion.
    The function we want to invoke is "Restart" which I found via the REST API documentation pages: https://docs.microsoft.com/en-us/rest/api/appservice/webapps
    Restart: https://docs.microsoft.com/en-us/rest/api/appservice/webapps/restart
    You can check out all the other parameters that one could provide. In this case, we dont need any additional parameters.
  9. Client Api Version: This is date value and you can get it from the Restart API documenation page. Its called "API Version" and can be found at the top of the page. In my case, as of writing of this post the value was "2019-08-01".
  10. Final result will look like this:
  11. Test it out by clicking run.

    1. If it ran successfully, you should see a screen that looks like this
    2. You should also check the activity log of the web-app to see if it did restart.

Restarting a redis cache

To restart a redis cache, here are the parameters you need for the Invoke operation:

Subscription: subscription in which the resource resides
Resource Group: resource group in which the resource resides.
Resource Provider: Microsoft.Cache
Short Resource Id: Redis/NameOfCacheInstance (can be found under properties of your cache instance)
Client API Version: 2016-04-01 (as of the writing of this post)
Action Name: forceReboot
Request Body: {"rebootType":"AllNodes"}