YouTube2Text

Azure + Databricks Interview Questions from Real Project Scenarios — Transcript

by DataBeli · 7,882 words · 1,103 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hi, I'm Narendra Kumar. I'm a senior
  2. 0:03data architect with 12 years of
  3. 0:04experience in IT. I'm a certified
  4. 0:07Microsoft solutions architect and a
  5. 0:09datab bricks MVP as well. Uh taking
  6. 0:12interviews of data engineers and data
  7. 0:14architects. It is part of my day-to-day
  8. 0:16work. And in this 40-minute video, we
  9. 0:19are going to cover 50 plus questions
  10. 0:21related to Azure and datab brick
  11. 0:23services as well as lot of project
  12. 0:26related scenarios. We will cover
  13. 0:28questions related to data injection,
  14. 0:31metadatriven framework, data bricks,
  15. 0:33data transformation, CI/CD, governance,
  16. 0:37email notification, security and data
  17. 0:39consumption as well. Uh after going
  18. 0:42through this video, you will be able to
  19. 0:44answer any questions in any of the
  20. 0:45interview related to Azure and data
  21. 0:48engineering projects. Uh before this
  22. 0:51video, I have created two other videos.
  23. 0:54one about a detailed course on Azure
  24. 0:56data factory and all the integrations
  25. 0:58with it and another one about a
  26. 1:01healthcare end toend Azure data
  27. 1:03engineering project. So I strongly
  28. 1:05recommend that you go through those
  29. 1:07videos so that these questions will seem
  30. 1:09more relatable and you will be able to
  31. 1:11understand them properly. And if you are
  32. 1:14already familiar with Azure services and
  33. 1:16you have worked on some hands-on project
  34. 1:19then you can go through this video
  35. 1:20directly as well. And in this video I'm
  36. 1:24going to show lot of ADF related real
  37. 1:26pipelines, real data factory notebooks
  38. 1:30and other real Azure related elements.
  39. 1:32All those artifacts are taken from this
  40. 1:35project and all those artifacts are
  41. 1:37available on GitHub for free. And to
  42. 1:40take it a step further, I have created a
  43. 1:43PDF document as well for all the
  44. 1:45questions that I'm going to cover in
  45. 1:47this video along with screenshots and
  46. 1:50relevant answers so that you can use
  47. 1:52this PDF as a revision document before
  48. 1:55going to any of the interviews.
  49. 1:58So the link for this PDF is also
  50. 2:00available in the description of this
  51. 2:01video. And on my channel you will find
  52. 2:04lot of latest stuff related to data
  53. 2:07engineering. Lot of projects are there.
  54. 2:09Other interview related videos are
  55. 2:11there. So feel free to check them out if
  56. 2:13you are interested and if you are
  57. 2:16interested to stay upto date what is
  58. 2:17going on in the market about data
  59. 2:19engineering and my videos. So don't
  60. 2:21forget to hit the subscribe button. So
  61. 2:24without any delay let's get started.
  62. 2:28Let's start with some Azure data factory
  63. 2:30related questions. So the first question
  64. 2:33can be like what is the difference
  65. 2:34between a linked service and a data set
  66. 2:36in data factory. So the answer is linked
  67. 2:39service it provides the ability to
  68. 2:41connect with any external service
  69. 2:43outside data factory. It can be a source
  70. 2:46or any other Azure service. Here we
  71. 2:48mainly provide connection details like
  72. 2:50their URL or server name and
  73. 2:53authentication related details so that
  74. 2:55we get the ability to connect with
  75. 2:57anything external outside data factory
  76. 3:00wherein data set it is the next step
  77. 3:03after linked service where
  78. 3:06we specify the exact uh database or
  79. 3:09table name or in case of files we
  80. 3:11specify the exact file name folder name
  81. 3:13etc.
  82. 3:15Now the next question it can be like
  83. 3:16what is the difference between debugging
  84. 3:19a pipeline and clicking on trigger now.
  85. 3:22So we can say debug as the name suggest
  86. 3:24it is about like debugging uh any
  87. 3:27pipeline while doing the development
  88. 3:29where the pipeline runs end to end uh in
  89. 3:32the current branch whatever we have
  90. 3:34selected wherein trigger now it actually
  91. 3:37triggers the published uh copy of the
  92. 3:39pipeline and another difference is that
  93. 3:42in debug if we are using a for each kind
  94. 3:45of loop so there things will run
  95. 3:47sequentially only wherein in trigger now
  96. 3:50from the published pipeline it will be
  97. 3:52able to actually trigger multiple things
  98. 3:54in parallel and next jumping to some
  99. 3:57active activity related questions. So
  100. 4:01first one it can be let's say uh in a
  101. 4:03lookup activity if you are reading some
  102. 4:05data from a SQL DB then how do you use
  103. 4:09like first row only option when do you
  104. 4:11enable it when do you disable it? This
  105. 4:13question we check so that we know that
  106. 4:15actually the person has really used this
  107. 4:17lookup or not. So the answer to that is
  108. 4:21if we enable the first row only then it
  109. 4:24will always pick up the first row itself
  110. 4:26directly as a uh JSON object note as an
  111. 4:30array. So that way whenever we have to
  112. 4:33access any element from this then we can
  113. 4:36directly access it like the activity dot
  114. 4:39output dot first row then the the column
  115. 4:42name. So we don't have to parse any
  116. 4:44array. But uh in any case if we are
  117. 4:47expecting a multiple rows as output and
  118. 4:50if you want to use the array actually uh
  119. 4:53then we keep it disabled so that in the
  120. 4:55next activity like we can directly read
  121. 4:58the entire array itself just by using
  122. 5:01output dot value and that entire array
  123. 5:04can be like used for any further
  124. 5:05processing. And the next question it
  125. 5:08could it could be about for each
  126. 5:09activity that how do we pass any element
  127. 5:13to the for each and how do we use it
  128. 5:15inside the for each loop for multiple
  129. 5:18elements. So for passing part we can say
  130. 5:20that in the setting section uh in the
  131. 5:23items we pass the output of any previous
  132. 5:25activity or we can pass any other array
  133. 5:28as well that we can pass and inside the
  134. 5:31for each if we want to access the
  135. 5:33element that we have passed. So that is
  136. 5:36directly available is at the rate item.
  137. 5:39So at the rate item dot whatever we want
  138. 5:41to use. So in the array whatever we had
  139. 5:44passed we we are able to use it inside.
  140. 5:47Now the next question it could be about
  141. 5:49fail activity like what is the fail
  142. 5:51activity and when we may need it. So
  143. 5:54fail activity it is a simple activity
  144. 5:56which uh just set the overall status of
  145. 5:59the pipeline as failure and there we can
  146. 6:02pass any failure message and error code
  147. 6:05as well. So normally we use this
  148. 6:07activity when we want to do something
  149. 6:10based on the failure of the previous
  150. 6:12activities or pipelines. So but if we
  151. 6:15normally do any operation like adding
  152. 6:18information into audit table or
  153. 6:20something then overall status will be
  154. 6:22considered as success because the last
  155. 6:24script was successful even though it was
  156. 6:26based on failure of previous script or
  157. 6:29previous activity. So to set overall
  158. 6:32status as failure we can manually call
  159. 6:35this activity so that specifically the
  160. 6:37overall status of the pipeline is set as
  161. 6:39failed.
  162. 6:41Uh the next question it can be about
  163. 6:43switch activity like what is the switch
  164. 6:45activity and how practically you have
  165. 6:47used it. So we can say like switch in
  166. 6:50the switch activity we can pass an
  167. 6:52expression or any variable. So depending
  168. 6:55on its value it can have multiple case
  169. 6:58statements. So depending on the value we
  170. 7:01can call different set of activities and
  171. 7:04we can say we have used it for the
  172. 7:07deciding on the source systems. So let's
  173. 7:09say if we are passing source system as
  174. 7:11input then for postress we can call a
  175. 7:14separate copy data for ADS we can call a
  176. 7:17separate one and in future if we have
  177. 7:19more sources we can directly add in the
  178. 7:21switch statement itself because we need
  179. 7:23separate copy data for each and every
  180. 7:25source. So that is how we have used it.
  181. 7:28And the next question it is very
  182. 7:30important. So it can be like how can we
  183. 7:33pass any parameter value from a adf
  184. 7:36pipeline to the datab bricks notebook
  185. 7:38and then use it in the notebook. So for
  186. 7:41that what we do is in our notebook
  187. 7:43activity uh we get this base parameters
  188. 7:46option. So there we can pass any number
  189. 7:48of parameters from ADF and then on datab
  190. 7:52brick side we create widgets to receive
  191. 7:54the values of those parameters and after
  192. 7:57reading the values from widgets then we
  193. 7:59can use them inside the notebook.
  194. 8:01however we want. And the next question,
  195. 8:04this one I would say like almost more
  196. 8:06than 50% people don't know the answer.
  197. 8:09So that is uh how can we pass any output
  198. 8:12parameter or any return value from datab
  199. 8:15bricks notebook back to the pipeline and
  200. 8:17then use it there. So the answer to that
  201. 8:20is like we have this command dbutil
  202. 8:23notebook.exit exit there whatever value
  203. 8:26we pass as a string or as a JSON. So
  204. 8:28that is what is returned as a output
  205. 8:31from the notebook and then inside the
  206. 8:33pipeline we can use that value as the
  207. 8:36output value from the notebook. So in
  208. 8:39the next activities if we want to use it
  209. 8:41we can use like that activity dot output
  210. 8:44dot run output that way we receive the
  211. 8:47value back. Now the next question it can
  212. 8:50be like what is the difference between a
  213. 8:52pipeline parameter and a global
  214. 8:54parameter. So pipeline parameter those
  215. 8:57that is something we create for a
  216. 9:00particular pipeline and their values we
  217. 9:02can pass through another pipeline or
  218. 9:05even through trigger as well and the
  219. 9:07scope of those parameters are within
  220. 9:09that pipeline. We can use them within
  221. 9:11that pipeline however we want not
  222. 9:14outside that pipeline. Whereas global
  223. 9:17parameters so that is something we
  224. 9:19create in the manage section separately
  225. 9:21which are independent of the any
  226. 9:24pipeline. So there whatever parameter we
  227. 9:27create those we can use them in any of
  228. 9:29the pipeline and these parameters are
  229. 9:32kind of global. So we define them once
  230. 9:34in ADF and use them everywhere.
  231. 9:37And the next question could be about the
  232. 9:39same thing that how do we use pipeline
  233. 9:42parameter or global parameter in a
  234. 9:44pipeline. So the answer is pipeline
  235. 9:47parameter we can directly access them as
  236. 9:49pipeline dotparameters dot the parameter
  237. 9:51name. And for global parameters we use
  238. 9:55like pipeline dot global parameters dot
  239. 9:58parameter name. And then the next
  240. 10:00question it can be about dynamic
  241. 10:02expressions that have you used any
  242. 10:04dynamic expression in ADF and uh what
  243. 10:07kind of things you have used or what all
  244. 10:09functions you have used. So there
  245. 10:11depending on your real experience and
  246. 10:13what things you have tried out you can
  247. 10:15answer like we can say like these are
  248. 10:17some of the common things that we can
  249. 10:19mention that I have used if statement a
  250. 10:22greater statement uh that checks like
  251. 10:25anything values greater than any any
  252. 10:28value or not then we can mention we I
  253. 10:30have used concat function to concat
  254. 10:33multiple strings and we can say we have
  255. 10:35used coales function to like pick up
  256. 10:39anything is null or not else like
  257. 10:41picking up a blank value or some other
  258. 10:43value. So these are some of the things
  259. 10:46you can mention and depending on your
  260. 10:47own hands-on you can mention uh some
  261. 10:50dynamic expressions that you have
  262. 10:52created.
  263. 10:53The next question it can be like what is
  264. 10:55the difference between a cancel and
  265. 10:57cancel recursive when you are debugging
  266. 11:00something. So these kind of questions
  267. 11:02they really confirm whether you have
  268. 11:04really hands-on experience or not. So
  269. 11:07cancel it will cancel only the current
  270. 11:09pipeline. If there is a inner pipeline
  271. 11:11triggered by this that will still keep
  272. 11:13running at the back end wherein in
  273. 11:16cancel recursive it will cancel any
  274. 11:18inner pipelines as well. Whatever has
  275. 11:21been triggered by this pipeline run. The
  276. 11:24next one it can be like what is a
  277. 11:25pipeline run ID and how can we access it
  278. 11:28dynamically within the expressions or
  279. 11:31parameters. So pipeline run ID it is the
  280. 11:34unique ID given to each run of the
  281. 11:36pipeline. Every time we run it, a new
  282. 11:39pipeline run ID is generated and within
  283. 11:42our parameters or dynamic expressions
  284. 11:45directly we can access it using either
  285. 11:47pipeline.tr run id and the next question
  286. 11:51it could be a small scenario based one.
  287. 11:53Let's say if we have multiple activities
  288. 11:55in the pipeline and let's say third or
  289. 11:57fourth activity failed then we have
  290. 12:00fixed the issue and if you want to rerun
  291. 12:02from that failed activity again then how
  292. 12:04can we do that? So for that we can say
  293. 12:07that in the monitor section we get uh in
  294. 12:10the run of the pipeline we get these
  295. 12:12options like either we can run uh rerun
  296. 12:14the entire pipeline or directly we can
  297. 12:17run uh from the failed activity or any
  298. 12:20selected activity as well and then next
  299. 12:23comes the very standard question like
  300. 12:25what are the types of triggers that we
  301. 12:27can create in ADF. So there we can say
  302. 12:30that we can have four types of triggers.
  303. 12:33So first one is schedulebased trigger
  304. 12:35where we specify that at what time we
  305. 12:38want to trigger something on a with a
  306. 12:40particular window. Let's say if we want
  307. 12:42to trigger something every day, every
  308. 12:44week, every month at some fixed time,
  309. 12:47then we use this as schedule trigger. If
  310. 12:50we want to something run something over
  311. 12:53a fixed window of time without
  312. 12:55specifying the exact time. Let's say if
  313. 12:57we want to run something every 15
  314. 13:00minutes, every 2 3 hours, every 1 2
  315. 13:03months without worrying what time it
  316. 13:05shall run, then we use the tumbling
  317. 13:07window. And if we want to trigger it
  318. 13:10based on the events from a storage like
  319. 13:12whenever some file is created or if a
  320. 13:16file is deleted uh then we use the uh
  321. 13:19storage event based trigger and then the
  322. 13:22last one is custom events. So if we want
  323. 13:25more decoupled scenarios wherein if we
  324. 13:28create an external uh like event grid
  325. 13:30there if we get a new event and based on
  326. 13:34that if you want to trigger something uh
  327. 13:36then like we can use this custom events
  328. 13:39trigger as well and next one also is a
  329. 13:42very standard question like what are the
  330. 13:44types of integration runtimes that we
  331. 13:46can use in ADF. So in total there are
  332. 13:49three types. So one is self-hosted
  333. 13:51integration runtime. So we use this one
  334. 13:54when we want to connect something which
  335. 13:56is on premise or if it if uh the service
  336. 13:59is on private network then we set up our
  337. 14:02own self-hosted integration runtime to
  338. 14:04connect with that and if the service we
  339. 14:07want to connect it is on Azure directly
  340. 14:10then we use Azure integration runtime
  341. 14:13and then we have a autoresolve
  342. 14:14integration runtime as well which when
  343. 14:17we use so it will automatically decide
  344. 14:19like which integration runtime it can
  345. 14:21use so that we don't have to uh select
  346. 14:23and choose. So these were all the core
  347. 14:26ADF related questions. Now let's jump to
  348. 14:29some scenario- based questions related
  349. 14:31to metadatriven framework. So the first
  350. 14:34question can be the very generic that
  351. 14:36have you worked on any metadatriven
  352. 14:38framework? Can you explain it at a very
  353. 14:40high level? Or in other words, it can be
  354. 14:43like uh have you like ingested multiple
  355. 14:46tables in let's say hundreds. If you
  356. 14:48have to ingest hundreds of tables from
  357. 14:50different sources then how will you
  358. 14:52build a framework for that. So for that
  359. 14:55we can say that we have some uh control
  360. 14:58tables in our se separate SQL DB and
  361. 15:01based on those tables we have created
  362. 15:03some reusable pipelines and notebooks
  363. 15:06which can be used to ingest the data
  364. 15:08from any data from any number of tables
  365. 15:11from the same sources or similar type of
  366. 15:14sources. There we have separate tables.
  367. 15:17Let's say one table with the table
  368. 15:19related configurations like uh the
  369. 15:22source configuration source schema or
  370. 15:24path table name or folder and target
  371. 15:27related target table related information
  372. 15:30everything the type of load we want
  373. 15:33watermark columns merge keys these kind
  374. 15:36of columns we have and then we have a
  375. 15:39watermark table where we control like
  376. 15:42which where we mention the watermark
  377. 15:44value for incremental load and we have
  378. 15:46audit table where we log each and
  379. 15:49everything in detail. For each table we
  380. 15:51me we log the run ID, table ID, stage,
  381. 15:55status, number of records, everything we
  382. 15:57log in a audit table and using these
  383. 16:01three tables we drive or we have built
  384. 16:04reusable
  385. 16:06pipelines in ADF where we read the
  386. 16:09configurations using lookup activities.
  387. 16:11Then we have prepared our copy data
  388. 16:14activity and the notebook activity. Copy
  389. 16:17data for source to landing notebooks for
  390. 16:19landing to bronze and silver. All of
  391. 16:21them are parameterized so that these can
  392. 16:24be used for each and every uh table that
  393. 16:27that is coming in and source to landing
  394. 16:30piece because that is uh we need to
  395. 16:32control it for different sources. So we
  396. 16:35have a clone of that one. So one copy
  397. 16:38data can be used for any table or any
  398. 16:40file injection from single source. We
  399. 16:43have multiple such copy data. But the
  400. 16:45notebook part that is like completely
  401. 16:48reusable. So whether it is a file-based
  402. 16:51source or database based source. So for
  403. 16:54everything we have a single notebook
  404. 16:56that is able to ingest every type of
  405. 16:58data load and our pipelines they are
  406. 17:01driven by our metadata tables and they
  407. 17:05log everything. they update the
  408. 17:07watermarks end to end. So that is how
  409. 17:09like this framework works end to end.
  410. 17:12And the next question it can be a
  411. 17:14follow-up or something specific. Let's
  412. 17:16say if you are doing incremental load uh
  413. 17:19then how do you make sure that in in
  414. 17:22every injection it is reading only
  415. 17:24incremental data. So the answer to that
  416. 17:26is like we have a watermark table where
  417. 17:29we track the track the
  418. 17:33current injection timestamp until when
  419. 17:35the data has been loaded and that value
  420. 17:38we read inside our pipelines using
  421. 17:41lookup and then we specify that in our
  422. 17:44queries while reading the data. So if
  423. 17:46the load type is incremental then we use
  424. 17:49the watermark column and watermark value
  425. 17:51to apply a wear close so that it read
  426. 17:54only incremental data every time. And
  427. 17:56the next question it could be similar
  428. 17:58about file based source that in your
  429. 18:01source if in the same folder there are
  430. 18:03new files keep coming so how do you make
  431. 18:06sure to read only the new files from the
  432. 18:08source. So there again we can say that
  433. 18:10we have a watermark table where we store
  434. 18:14like until what time the files has been
  435. 18:16loaded and whenever we are bringing new
  436. 18:19data that time in our copy data activity
  437. 18:23we have this start time for the last
  438. 18:26modified. So there we specify the value
  439. 18:29so that whatever files has been modified
  440. 18:31after that time step only those files
  441. 18:34are picked up. And the next scenario
  442. 18:36based question can be let's say if your
  443. 18:38pipeline is running so there are three
  444. 18:40phases landing bronze silver if your
  445. 18:43pipeline fails in between in any of
  446. 18:45these two stages let's say landing or
  447. 18:47bronze in case of incremental load then
  448. 18:50how do you make sure that in the next
  449. 18:52run we don't lose any data we are
  450. 18:56reading that incremental data again so
  451. 18:59uh the answer to that is so in case of
  452. 19:01incremental data we update the watermark
  453. 19:05value only after the data has been
  454. 19:07written successfully into our silver
  455. 19:09layer. If it fails before any of these
  456. 19:13steps like in silver or before that we
  457. 19:15don't update the watermark value. So if
  458. 19:18we don't update it in the next run
  459. 19:20automatically because the value was not
  460. 19:22updated it will pick up the data from
  461. 19:25previous value only. It will not skip
  462. 19:27the data which was loaded previously and
  463. 19:30only that new data it will read and then
  464. 19:32load end to end again and also to make
  465. 19:35sure that uh whatever data was landed as
  466. 19:39part of previous run it is not loaded
  467. 19:41again we are keeping track of a landing
  468. 19:44time stamp that we pass uh throughout
  469. 19:47the layer like landing branch and
  470. 19:49silver. So whatever data we land in our
  471. 19:52landing folder we create a timestamp
  472. 19:55folder there and only that folder we
  473. 19:57read in bronze only that data we read in
  474. 20:00silver. So that is how our pipelines are
  475. 20:03errorprone uh sorry error proof. Now the
  476. 20:07next question can be like how are you
  477. 20:09creating your notebook so that they can
  478. 20:12be like same notebook can be used for
  479. 20:14file based sources and any RDBMS or
  480. 20:17database related sources. So there we
  481. 20:19can say that for database related
  482. 20:22sources we land the data always in the
  483. 20:24park format because it is very compact.
  484. 20:27For file based sources we land the data
  485. 20:29in original format CSV or JSON whatever
  486. 20:32it is coming in. And then in our landing
  487. 20:35to branch notebook we uh we have a
  488. 20:37parameter as well source file format
  489. 20:40which comes up from our metadata tables.
  490. 20:42Based on that file format we uh provide
  491. 20:45the spark read options accordingly and
  492. 20:48then rest of the steps are common. So
  493. 20:51that is how the same notebook works for
  494. 20:53any file format the data is coming in.
  495. 20:56And the next question can be like what
  496. 20:57kind of audit columns you are
  497. 20:59maintaining into your bronze, silver and
  498. 21:01gold tables. So there we can say that we
  499. 21:04are we mainly maintain three types of
  500. 21:07columns. One is landing timestamp so
  501. 21:09that we can track the folder where the
  502. 21:12data is landed and when it is landing. A
  503. 21:15second one is insert timestamp so that
  504. 21:18we can know when each and every row is
  505. 21:20inserted into our tables. And third one
  506. 21:23for silver layer we can say we have a
  507. 21:25update timestamp as well so that if same
  508. 21:28record is updated then like we update
  509. 21:30this time stamp so that we can know when
  510. 21:32the record has been updated. The next
  511. 21:35question it can be like how do you use a
  512. 21:37merge statement or how do you make sure
  513. 21:39that while writing the data into silver
  514. 21:42layer there are no duplicates. So the
  515. 21:44answer to that is we use a merge
  516. 21:46statement based on some primary keys
  517. 21:49which are defined in the table. So we
  518. 21:51merge into our target table by reading
  519. 21:53the data from source. First we check our
  520. 21:56condition based on the primary keys. If
  521. 21:59the data is already there in the target
  522. 22:01then we update all the values except
  523. 22:04insert timestamp because we don't we
  524. 22:06want to retain original all the other
  525. 22:08columns we update and if based on those
  526. 22:11primary keys the data is not present
  527. 22:13that means that is new data. So then
  528. 22:16then only we insert that as a new data
  529. 22:18into our target table. So that is how we
  530. 22:21use a merge statement. So to this way we
  531. 22:24don't end up creating any duplicates
  532. 22:26into our silver layer. Uh the next
  533. 22:29question it can be let's say if you have
  534. 22:31built your network uh if you have built
  535. 22:33your framework sorry then uh if you have
  536. 22:37to ingest one more table from the same
  537. 22:39source then what are the steps that you
  538. 22:42follow? So then we can say for that one
  539. 22:44we just have to make entry into our
  540. 22:46metadata tables. So from the same source
  541. 22:50we just add another row into our tables
  542. 22:53for the table configuration and
  543. 22:55watermark values if required and that's
  544. 22:58it. So just by adding that metadata
  545. 23:00entry the table is picked up
  546. 23:02automatically and ingested end to end
  547. 23:04and we can mention that we have a is
  548. 23:06active column as well using which we can
  549. 23:09control as well which table we want to
  550. 23:11run and which table we can skip while
  551. 23:13running. And the next question can be
  552. 23:15like uh if in your framework if you have
  553. 23:18to bring in a new source then what are
  554. 23:21the steps that you will follow. So we
  555. 23:24can say if the new source if it is of of
  556. 23:26a different type than currently whatever
  557. 23:29we have in the system let's say if we
  558. 23:30have a postgrace and adls and if you
  559. 23:33want to ingest the data from Oracle then
  560. 23:35we need a separate linked service
  561. 23:37separate data set and copy data activity
  562. 23:40which we need to add in our switch
  563. 23:41statement so that it can land the data
  564. 23:44from source to landing from for that
  565. 23:46source. So all these connections we have
  566. 23:49to configure in linked service. Then
  567. 23:51create a new data set, create a new copy
  568. 23:53data and add in this switch statement
  569. 23:56for source to landing injection. Apart
  570. 23:59from this uh like nothing else is
  571. 24:01required because our notebooks are
  572. 24:03reusable. So those can be used to ingest
  573. 24:06the data from any of the source. And
  574. 24:09then if the source is of same type let's
  575. 24:12say we are ingesting the data from
  576. 24:14postgress already we want to connect
  577. 24:17another postgress and bring the data
  578. 24:19from there then we have two options
  579. 24:21either we can create a cloned linked
  580. 24:24service with the different connection
  581. 24:26details or in the same linked service we
  582. 24:28can parameterize even the connection
  583. 24:31details as well like the URL username
  584. 24:34password those things also we can
  585. 24:35parameterize and put in a config table
  586. 24:38and then even use the same copy data,
  587. 24:40same data set linked service for a new
  588. 24:43source of same type.
  589. 24:46Now let's cover some of the questions
  590. 24:48related to gold layer. So there the
  591. 24:51first question it can be like have you
  592. 24:52worked on or used any STM documents and
  593. 24:56what kind of details are there in an STM
  594. 24:58document. So there we can say that for
  595. 25:01every table like we have got the
  596. 25:04documents from the client side or we can
  597. 25:06say like we prepared them after working
  598. 25:08with the end users where we captured the
  599. 25:11details like each and every column their
  600. 25:14data type from which source table it is
  601. 25:16coming. What is the transformation logic
  602. 25:19that is required? Which joins and
  603. 25:21filters are required? What will be the
  604. 25:24exact table name? Uh so what will be the
  605. 25:27load type? these with all these kind of
  606. 25:29detailed information we prepare in a STM
  607. 25:32document and the next question can be
  608. 25:35like uh have you generated any notebooks
  609. 25:38in datab bricks using AI. So we can say
  610. 25:41yes for gold layer specifically we have
  611. 25:43generated lot of notebooks using AI
  612. 25:46wherein first we go or we prepared the
  613. 25:48HTTM documents then we provided those
  614. 25:52documents directly to Genie code and
  615. 25:54asked it to create asked it to create
  616. 25:57notebook for us. So it created the very
  617. 25:59initial version of the notebooks with
  618. 26:01really good details. So those notebooks
  619. 26:04were created automatically and then we
  620. 26:07reviewed the notebooks. We went through
  621. 26:09the logic again to confirm and then
  622. 26:11refine the notebooks as and when
  623. 26:13required. And then the next question can
  624. 26:15be like how are you using a framework to
  625. 26:19like run the multiple notebooks in the
  626. 26:21gold layer. So there we can say like we
  627. 26:24have the same metadata tables that we
  628. 26:27can use for both silver and gold layer.
  629. 26:30So for gold layer as well we specify our
  630. 26:32table names and other details into our
  631. 26:34metadata DB itself. From there we'll
  632. 26:38read the list using lookup activity
  633. 26:40iterate over it in a for each and then
  634. 26:43call the notebook using a notebook
  635. 26:45activity based on the table name
  636. 26:47dynamically. So whatever notebook is
  637. 26:49present in the standard folder that is
  638. 26:51called automatically when we pass the
  639. 26:54name of the notebook dynamically uh
  640. 26:57through an expression
  641. 26:59and whatever notebook we are calling. So
  642. 27:02before and after that we are even
  643. 27:04logging our status into our OD table as
  644. 27:06well so that we can track the progress
  645. 27:08and status
  646. 27:10and then the next question it can be
  647. 27:12like are you doing full load or
  648. 27:14incremental load for your goal tables.
  649. 27:16So there we can say we have for small
  650. 27:19tables we always do full load so that we
  651. 27:22don't have to worry about incremental
  652. 27:24logic. So full load is easy and faster.
  653. 27:27For big tables, we can say that we have
  654. 27:29a driving table. From that table, we
  655. 27:32read the data based on some incremental
  656. 27:34logic which we put in the watermark
  657. 27:37table. Read the watermark. We read the
  658. 27:39incremental data. So that is the driving
  659. 27:41table and the big table. For other
  660. 27:43tables, we we read the data completely
  661. 27:46and join the tables. That is how we do
  662. 27:48like incremental load for some of the
  663. 27:50tables. So now next let's cover some of
  664. 27:53the questions related to failure
  665. 27:55handling. So the question it can be like
  666. 27:59what kind of options are you using in
  667. 28:00your pipelines to handle failures and
  668. 28:04make your pipelines more robust. So
  669. 28:06there we can say like we are using
  670. 28:08various options like for each and every
  671. 28:11activity we are configuring the retry
  672. 28:13options that if there is some temporary
  673. 28:16or a a quick failure that so it can
  674. 28:19retry the same activity again. And from
  675. 28:22overall design perspective we have kept
  676. 28:25all the uh data related operations into
  677. 28:27a separate pipeline so that even if a
  678. 28:30single activity fails in the pipeline.
  679. 28:33Uh then in the outer pipeline we are
  680. 28:35able to capture it and log it into
  681. 28:37properly. And then in terms of auditing
  682. 28:39and logging, we are logging the
  683. 28:41information in very detail including the
  684. 28:44ADF run ID so that we can trace back the
  685. 28:47things and table ID, status, start time,
  686. 28:50end time, everything we are logging and
  687. 28:53we have set up a daily summary status
  688. 28:55email as well so that directly we can
  689. 28:57know if something has been success,
  690. 28:59everything is success or something has
  691. 29:01failed. For the failed entries directly
  692. 29:04we can check out the table ID and their
  693. 29:06run ID directly go to ADF and check out
  694. 29:09the failure. And here the next question
  695. 29:11can be like what kind of options do we
  696. 29:13get at the activity level to handle
  697. 29:15failures. So there we can say we have
  698. 29:18three options for timeout for very long
  699. 29:21running we can specify a timeout so that
  700. 29:24we don't have to wait indefinitely and
  701. 29:27then we have a number of retries in case
  702. 29:29of failure how many times we want to
  703. 29:31retry and retry interval as well how
  704. 29:34much gap we want to provide between
  705. 29:37different runs and the next question can
  706. 29:39be like how exactly you can find the
  707. 29:42error message or what is wrong with the
  708. 29:44pipeline. So there we can say that in
  709. 29:47our notifications we get the run id of
  710. 29:49the pipeline. Using that run id directly
  711. 29:52we can go to monitor section find that
  712. 29:55particular run ID and then in the
  713. 29:57activity output we can directly check
  714. 30:00out the error message. From there we can
  715. 30:02understand what could be wrong and then
  716. 30:04the next question can be like after
  717. 30:06fixing any problem do you rerun your
  718. 30:09pipeline entirely or do you rerun from
  719. 30:11the failed activity. So the answer to
  720. 30:14that can be like it depends on the
  721. 30:16scenario. If some ADF activity related
  722. 30:19failure is there for example copy data
  723. 30:21or something then if you're applying a
  724. 30:24fix we need to publish the fix or save
  725. 30:26it and then again run it from the start.
  726. 30:29But if the failure is related to some
  727. 30:31notebook then like we can fix the issue
  728. 30:34inside that notebook and we can rerun
  729. 30:36from the failed activity as well. And it
  730. 30:39also depends on like how much f how much
  731. 30:42time it will take to rerun from start or
  732. 30:44from failed and what kind of impact it
  733. 30:47can have like if it can create duplicate
  734. 30:49data by rerunning entire pipeline then
  735. 30:52we avoid it and if it is just a quick
  736. 30:54run which uh doesn't create any
  737. 30:56duplicate data or something like that
  738. 30:58then we can run from the failed activity
  739. 31:00as well. Uh next moving on to some
  740. 31:03monitoring related questions and the
  741. 31:05question can be like uh have you
  742. 31:08monitored the uh copy data activity and
  743. 31:11there what kind of details we can figure
  744. 31:13out from the monitoring section. So
  745. 31:15there we can say that for moni for copy
  746. 31:17data we get a specific details section
  747. 31:20in the monitoring section where we can
  748. 31:23monitor how many uh rows has been read
  749. 31:25and written how how much data volume has
  750. 31:28been read and written how many parallel
  751. 31:30connections were used what was the speed
  752. 31:32of data duration of speed so all these
  753. 31:36details we get in the output of the copy
  754. 31:38data and the next question it can be
  755. 31:40let's say for lookup kind of activities
  756. 31:43or for script kind of activities it is
  757. 31:45if we are using dynamic expressions to
  758. 31:47prepare those queries. How can we know
  759. 31:50that at runtime what exact query was
  760. 31:52used. So there we can say in the
  761. 31:55monitoring section we can check out the
  762. 31:57input of that particular activity. There
  763. 32:00we can check the exact query that has
  764. 32:02been prepared using the dynamic
  765. 32:04expression. So these kind of statements
  766. 32:06are available for lookup uh script kind
  767. 32:09of activities. And next let's cover some
  768. 32:12of the questions related to email
  769. 32:14notification. So the generic question
  770. 32:16can be like which service are you using
  771. 32:18for email notification. So there we can
  772. 32:21say that we have built our own logic
  773. 32:23apps workflow and that we are calling it
  774. 32:26in the ADF using a web activity. And
  775. 32:29then the next question can be let's say
  776. 32:31if you have to send a consolidated email
  777. 32:34for all your silver and gold uh table
  778. 32:37injections then how can you send it? So
  779. 32:40there we can say that we have an audit
  780. 32:42table wherein we insert the status and
  781. 32:45record count for each and every table
  782. 32:47for silver and gold and there we use the
  783. 32:49same ADF run ID for logging. So using
  784. 32:52that run ID we pick up all the rows and
  785. 32:55then include that in a single email that
  786. 32:58is how we prep we prepare and send a
  787. 33:00consolidated email. Then the next
  788. 33:02question can be like can you explain the
  789. 33:04design of your email notification
  790. 33:06pipeline or it can be like uh how how
  791. 33:10have you created a reusable pipeline for
  792. 33:12email notification. There we can say
  793. 33:14that our pipeline it takes just af run
  794. 33:17id based on that run ID it fetches all
  795. 33:20the information from our audit table and
  796. 33:23also it check overall status whether
  797. 33:25there is a single at least one failure
  798. 33:27or everything is successful. Based on
  799. 33:30that we prepare email subject, header,
  800. 33:33footer and a separate status table, a
  801. 33:36separate a set variable in separate set
  802. 33:39variable activities and then we prepare
  803. 33:42a consolidated
  804. 33:44body that we can send to logic apps and
  805. 33:47a follow-up question can be like what
  806. 33:49kind of parameterization you have done
  807. 33:51for logic apps. So there we can say that
  808. 33:54we have parameterized the subject email
  809. 33:57recipient and body part we are sending
  810. 34:00it in three different parameters. So we
  811. 34:03have a header where we send the highle
  812. 34:06information. Then we have a status table
  813. 34:09and then we have a footer. So using
  814. 34:12these variables we are able to
  815. 34:14parameterize everything while sending
  816. 34:16the data to logic apps. And then the
  817. 34:19next question can be like have you
  818. 34:20worked on the logic app site and there
  819. 34:22what kind of activities you are using.
  820. 34:26So there we can say yes I have worked
  821. 34:28and uh there mainly like we are using
  822. 34:30four activities. We are first one is
  823. 34:33about a trigger. We are using a HTTP
  824. 34:35based trigger so that it can be
  825. 34:37triggered from a web activity from ADF.
  826. 34:40Then the table we are passing that is
  827. 34:43available as a JSON array. So we convert
  828. 34:46the table uh using a using a create HTML
  829. 34:50activity. Then we add border using a
  830. 34:53compose activity and then we send the
  831. 34:56email which is parameterized using a
  832. 34:58send email activity. And next let's
  833. 35:01cover some security related questions.
  834. 35:03So we can say like how are you storing
  835. 35:06your credentials securely in your
  836. 35:08environment. So there we can say that we
  837. 35:10have configured Azure key volt and
  838. 35:13whatever passwords or credentials we
  839. 35:16need to store we store them in the key
  840. 35:18volt as secrets and then we have created
  841. 35:21a linked service for key volt in our ADF
  842. 35:24and then those secrets we read them
  843. 35:27through the key volt here by selecting
  844. 35:29the linked service then the secret name
  845. 35:31we are able to read the secret and use
  846. 35:33directly in the uh linked services
  847. 35:36without without exposing the actual
  848. 35:40password or actual credential in the
  849. 35:42linked service or on ADF site. The next
  850. 35:45question it can be about connecting
  851. 35:47ADLS. So it can be like uh what kind of
  852. 35:50authentication you are using to connect
  853. 35:53with ADLS and how can we set up a
  854. 35:55connection with ADLS in Azure data
  855. 35:57factory. So there we can say that we are
  856. 35:59using system assigned managed identity
  857. 36:02and for the managed identity of Azure
  858. 36:05data factory we have given the store
  859. 36:08storage blob data contributor access on
  860. 36:11that storage account and if you provide
  861. 36:13that access then we don't have to
  862. 36:15provide any credential for connecting
  863. 36:17the connection is automatically using
  864. 36:20that managed identity and the next
  865. 36:23question which is very very important
  866. 36:25question that if you have a new storage
  867. 36:27account then how can you connect that
  868. 36:30storage account in datab bricks uh and
  869. 36:33what all steps you need to follow how
  870. 36:35exactly you can connect it and read
  871. 36:37write some data. So there we can say
  872. 36:39that for that connection we are using
  873. 36:41the unity catalog access connector. So
  874. 36:45using that access connector step one is
  875. 36:47that we have created a credential in
  876. 36:49unity catalog using that same managed
  877. 36:53identity of that connector.
  878. 36:55Then is the next step we can say that
  879. 36:58for that connector managed identity we
  880. 37:00have given the storage blob data
  881. 37:03contributor access on the ads side. Then
  882. 37:06as a step three of using that
  883. 37:09credential, we shall create an external
  884. 37:12location in the Unity catalog which uses
  885. 37:15that uses that credential and then
  886. 37:18connect to our ADLS account. And as a
  887. 37:22final steps to actually read and write
  888. 37:24files from the ADLS we can say we have
  889. 37:27created a volume using that external
  890. 37:30location
  891. 37:32and in that volume directly also we can
  892. 37:34browse all the files and folders and
  893. 37:36using that path we are able to read and
  894. 37:38write any data to the ADLS account. Then
  895. 37:42now let's cover some of the questions
  896. 37:44related to CI/CD process. So the
  897. 37:47question can be on Azure data factory
  898. 37:49side how do you follow CI/CD process. So
  899. 37:52we can say whenever we want to work on
  900. 37:55the main work on any new feature we
  901. 37:58create a new branch from the main branch
  902. 38:01and in that branch we make all our
  903. 38:03changes whatever we want to make the
  904. 38:05changes we apply those changes we test
  905. 38:08them and once we are ready then we
  906. 38:11create a pull request using which we can
  907. 38:14take our changes to the main branch that
  908. 38:16pull request it is reviewed by a senior
  909. 38:19architect or any other senior your data
  910. 38:22engineer after review the pull request
  911. 38:24is merged into the main branch and then
  912. 38:28the changes are published into the final
  913. 38:30published branch. So that is how we
  914. 38:32follow the CI/CD process on ADF side.
  915. 38:36And now the next question can be like
  916. 38:38how do you follow CI/CD process on Azure
  917. 38:40datab brick side. So there we can say
  918. 38:43that our final notebooks those reside in
  919. 38:45the main workspace folder which is
  920. 38:47outside all the user related folders. In
  921. 38:51that folder we have connected it through
  922. 38:53g and created a g folder. Whenever we
  923. 38:56want to work on any new feature then in
  924. 39:00our individual users folder we clone the
  925. 39:03g folder. Uh there we create a new
  926. 39:06branch out of the main branch. In that
  927. 39:09branch we work on all the changes. Then
  928. 39:12we uh push our changes to our feature
  929. 39:15branch. Create a pull request. That pull
  930. 39:18request is again reviewed by another
  931. 39:20architect level person. And then the
  932. 39:22changes are merged to the main branch.
  933. 39:25After the changes are merged to the main
  934. 39:27branch on the git side or devops side.
  935. 39:30Then in the final location again like we
  936. 39:34go to the g folder. there we pull all
  937. 39:37the latest changes which are available
  938. 39:40on the g side and then those changes are
  939. 39:43available for to be used by any
  940. 39:45pipeline. So that is how we follow this
  941. 39:47CI/CD process from development
  942. 39:49perspective
  943. 39:51and then next question can be like how
  944. 39:53the how your changes are deployed from
  945. 39:56one environment to another and what what
  946. 39:59kind of things are on your side that you
  947. 40:01take care. So there we can say that for
  948. 40:03CI/CD process we have a DevOps engineer
  949. 40:06in the team. They have built the
  950. 40:08deployment pipeline which can take the
  951. 40:10changes from one workspace and then
  952. 40:12deploy them in another workspace. On our
  953. 40:15side the way we are creating our
  954. 40:17pipelines and notebooks are uh so that
  955. 40:20those can be used in any of the
  956. 40:22environment without any changes. There
  957. 40:24we can say that we are using global kind
  958. 40:26of parameters
  959. 40:29where we need to specify the value at
  960. 40:31one place only what kind of environment
  961. 40:33it is and then everything is
  962. 40:35parameterized so that whatever
  963. 40:38environment it is the same code and same
  964. 40:40same pipeline work in both the
  965. 40:42environments.
  966. 40:44Now next let's cover some of the
  967. 40:46questions related to data consumption
  968. 40:48side. So there we can ask like uh what
  969. 40:52are the data consumption related
  970. 40:54services that you have worked on. So we
  971. 40:56can say that I have worked on uh datab
  972. 40:59bricks dashboard which is called as AIBI
  973. 41:01dashboard as well. I have created genie
  974. 41:04agent as well and datab bricks one also
  975. 41:06it is used by default for any data
  976. 41:08consumption.
  977. 41:10Uh then the next question specific to
  978. 41:12dashboard can be like how are you
  979. 41:14creating a dashboard in your existing
  980. 41:16system. So there we can say that the
  981. 41:18initial draft of the dashboard we are
  982. 41:20creating using Genie code. There we are
  983. 41:23specifying the tables that we are using
  984. 41:25and the main KPIs that it need to build
  985. 41:28at a very high level. After that it is
  986. 41:31able to provide a draft version of the
  987. 41:33dashboard which is really good and that
  988. 41:36dashboard we can change any details that
  989. 41:38we want. For example whatever widgets
  990. 41:41are there. So we can change their uh
  991. 41:44visualization type, their axis, their
  992. 41:47details. We can change their size, even
  993. 41:50delete them. In the data section, we can
  994. 41:52go ahead and make changes to any queries
  995. 41:55which are being used. So that way we can
  996. 41:57customize our dashboard depending on the
  997. 42:00need. And then finally publish the
  998. 42:02dashboard. So that is how like we are
  999. 42:04working on a dashboard.
  1000. 42:07And then next question it can be about
  1001. 42:09genie agent. So normally this is
  1002. 42:10something actually I would say very few
  1003. 42:12people know nowadays but it is very easy
  1004. 42:15option. So if somebody ask you have you
  1005. 42:17created any genie agent or how do you
  1006. 42:19create an agent. So it is very simple we
  1007. 42:22can say that we go to genie agent
  1008. 42:24section and we click on new. There we
  1009. 42:27select the tables that we want to
  1010. 42:29connect or metric views whatever
  1011. 42:30artifacts we want to build on it and
  1012. 42:33then we click on create.
  1013. 42:36So just like that using only those steps
  1014. 42:39directly we can create a very initial
  1015. 42:41version of the uh genie agent and the
  1016. 42:45next question it can also be like uh
  1017. 42:47something basic like like what exactly
  1018. 42:50is a genie agent and how it is used. So
  1019. 42:53there we can say that in Genie agent we
  1020. 42:56provide some artifacts like tables,
  1021. 42:59metric views, materialized views all
  1022. 43:02those things we can provide as sources
  1023. 43:05and then it has ready to be used
  1024. 43:07capability to provide any answer based
  1025. 43:10on natural language question. So the
  1026. 43:12customers they can ask their question
  1027. 43:14directly in plain English instead of a
  1028. 43:16SQL and they will get their answer
  1029. 43:18directly and a nice visualization as
  1030. 43:21well in the answer ready to be used.
  1031. 43:24And the next question related to Genie
  1032. 43:26agent can be like what kind of things
  1033. 43:29you can customize in a genie agent. So
  1034. 43:32there we can say that we can provide its
  1035. 43:34name, we can change its description, we
  1036. 43:37can provide list of common questions so
  1037. 43:40that those appear for any new user. We
  1038. 43:42can even provide a thumbnail or a logo
  1039. 43:45for that. And we can uh if you want to
  1040. 43:48customize the responses more then we can
  1041. 43:51set up some list of instructions for
  1042. 43:53that. We can give it some example
  1043. 43:55queries
  1044. 43:57and to validate its response we can add
  1045. 43:59some benchmarks as well. and then
  1046. 44:02confirm the output whether it is meeting
  1047. 44:04our expectations or not and then the
  1048. 44:07next question can be like are you aware
  1049. 44:09about datab bricks gen1
  1050. 44:11like what it can do or what are its
  1051. 44:13capabilities so we can say yes gen1 it
  1052. 44:17is a dedicated separate UI from datab
  1053. 44:20brick side which is specially designed
  1054. 44:23for business users where they don't need
  1055. 44:25to run any query or see any technical
  1056. 44:27information they can directly ask any
  1057. 44:30question about any of the data wherever
  1058. 44:32the data it is genie will figure it out
  1059. 44:35and just directly provide the response
  1060. 44:37in natural language along with a good
  1061. 44:39visualization
  1062. 44:41and then next question it can be like in
  1063. 44:44datab bricks genie related to genie what
  1064. 44:46all services you are aware of and what
  1065. 44:49all services you have used so there we
  1066. 44:52can say that I have mainly used three
  1067. 44:54services related to genie so genie code
  1068. 44:58for writing any code or modifying any
  1069. 45:00notebook books. I have also created
  1070. 45:02genie agents uh to like provide any
  1071. 45:05natural language based queries which
  1072. 45:08users can ask based on the curated set
  1073. 45:10of data sets or tables that we are
  1074. 45:13providing. And then third one is Genie 1
  1075. 45:16that is a dedicated UI for business
  1076. 45:18users which is configured automatically
  1077. 45:21and it provide good response based on
  1078. 45:23wherever our data is landing. So these
  1079. 45:27were all the questions that I wanted to
  1080. 45:29cover here and here we have covered all
  1081. 45:31the questions related to data injection
  1082. 45:34metadatriven framework transformation
  1083. 45:38CI/CD governance email notification
  1084. 45:41security and data consumption as well.
  1085. 45:45So I hope now you are more clear how to
  1086. 45:47answer all these questions and you are
  1087. 45:49more confident to present this or any
  1088. 45:52other project in any of the interviews.
  1089. 45:54So if you really like these questions uh
  1090. 45:57please put a like and comment on this
  1091. 45:59video. You can download the PDF as well
  1092. 46:01which I have provided uh so that you can
  1093. 46:04revise it anytime you want you are going
  1094. 46:06for any interview and please share it
  1095. 46:09with others also so that they are also
  1096. 46:11aware they also feel more confident and
  1097. 46:14if you have any other questions in mind
  1098. 46:16which are asked to you you don't know
  1099. 46:18how to reply put them also in the
  1100. 46:20comment section so that I can have a
  1101. 46:22look I can probably create another video
  1102. 46:25as well so that's all for now thank you
  1103. 46:29bye-bye Say happy learning.

About this transcript

This page contains the full transcript of Azure + Databricks Interview Questions from Real Project Scenarios by DataBeli, generated from the public captions YouTube serves with the video. The transcript has 7,882 words across 1,103 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.