Sunday, October 24, 2021

Access file/folder path in databricks

In databricks notebook, following are the way 2 ways to access the folder (example folder name: mnt):

  1. If you are reading from DBFS with pyspark, then you start your filename like this ‘/mnt/….’
  2. If you are reading form DBFS with regular python, you start your filename like this ‘/dbfs/mnt/…’

HTH

Saturday, October 23, 2021

Setup Single Node Job Cluster from Datafactory

 To Setup Cluster from datafactory job - 

  1. First we need to make the Workers to 0 - Yes set it to 0. See image below:

  2. Then under Addition Cluster Settings, look for Cluster Spark conf and set following name/values.

    "spark.databricks.cluster.profile": "singleNode"
    "spark.master": "local[*, 4]" 


  3. Last we need to set Tag under Cluster custom tags:

    "ResourceClass": "SingleNode" 







That's it!!!
HTH

Friday, May 7, 2021

Is HBL and Bank AL Habib same???

 Hello -

The answer is NO.

These are 2 different banks - 

HBL Iban starts as: PK HABB

Bank AL Habib Iban start as: PK BAHL


HTH

Sunday, October 4, 2020

Power BI Dynamic Row Level Security (RLS)

If you were like me trying to implement RLS using fields other than email, then you have come to right place.

RLS will automatically replace the value in filter for you.

Simply use the UserPrincipalName() or UserName() function on the column you want to identify users. It can be any string that can identify user. 

Example: Email Id, Guid, Name etc.

Power BI automatically replace the value in the function based on the value that will be supplied to apply the security in the report.

HTH.

Wednesday, September 9, 2020

Get Row Count in Powerbi Report (paginated report)

 Hi, How to get total number of rows in your report?

  1. Make sure you select a field which is NOT Nullable.
  2. Then insert a Textbox in the report
  3. Write Expression to display data in the expressions for Textbox.
  4. Expression:  =Count(Fields!EmployeeName.Value, "DataSet1")
HTH

Sunday, August 16, 2020

Azure BlobTrigger Function (v3) trigger twice

Hello,

Recently we came across a scenario where when the file was being uploaded to Blob via MS Flow, the function trigger (BlobTrigger) would trigger twice which will make the file to run thru function twice. 

Very frustrating!

After couple days of research, found that MS Flow has a setting that lets you upload of file in chunks. 

Turn it off and whola, problem fixed.

Here is screenshot of setting: