VHow would you design a reliable ETL pipeline for daily reports?
سؤال المقابلهندسة البيانات
يسأل المحاورون في وظائف هندسة البيانات عادةً عن تصميم خطوط المعالجة (pipelines) وSQL وكيفية التعامل مع الفشل. بعض الأسئلة نظرية، مثل المعالجة الدفعية مقابل المتدفقة أو ETL مقابل ELT، وبعضها قصص عن بيانات متأخرة وتكرارات ولوحات معلومات معطوبة. لا يلزمك أن تسمّي كل أداة، بل أن تُظهر أنك تفهم المشكلة التي تحلّها كل أداة.
طريقة جيدة للإجابة أن تتبع البيانات: من أين تأتي، وكيف تُعالج، وأين تُخزَّن، ومن يستخدمها. قل هذا المسار بصوت عالٍ وبالترتيب. ثم أضف جملة عن الفشل، مثل "if the job fails, we can safely run it again". هذه الجملة وحدها كثيرًا ما تميّز المهندسين أصحاب الخبرة عن مرشحين قرأوا عن الموضوع فقط.
- ✓كلمات → عبارات → جمل → تحدث
- ✓معنى الإجابة
- ✓اللغة
أكثر الأسئلة تكرارًا ونماذج الإجابات
What is the difference between ETL and ELT, and how do a data lake and a warehouse fit in?
ما الفرق بين ETL وELT، وأين تقع بحيرة البيانات (data lake) والمستودع (warehouse)؟
ما الذي يريد المحاور سماعه. ترتيب الخطوات، ولماذا شاع ELT، ورؤية متوازنة مع حالة لا يزال ETL فيها الخيار الأفضل.
نموذج إجابة بالإنجليزية للتدرّب عليه بصوت عالٍIn ETL, we transform the data before we load it into the target. In ELT, we load the raw data first and transform it inside the warehouse. Today I usually choose ELT, because modern warehouses are powerful and storage is cheap. I keep the raw data in a lake or in a raw layer, so I can rebuild everything if the business rules change. Then I write the transformations in SQL, with a tool like dbt, and I test them. ETL is still a good choice when sensitive data must be cleaned or masked before it lands. The warehouse holds clean, modelled tables for analysts. The lake holds raw files of any shape.
How do you decide between batch and streaming?
كيف تقرر بين المعالجة الدفعية (batch) والمعالجة المتدفقة (streaming)؟
ما الذي يريد المحاور سماعه. قرار مبني على حاجة العمل والكلفة لا على الموضة، مع الوعي بالأحداث المتأخرة والمكررة.
نموذج إجابة بالإنجليزية للتدرّب عليه بصوت عالٍI start from the business need, not from the technology. If people look at a dashboard once a day, a nightly batch job is simpler, cheaper and easier to debug. I choose streaming when the value of the data falls quickly with time, for example fraud checks or live alerts. Streaming has a cost. I have to handle late and out-of-order events, state and duplicates, and operations are harder. A middle path is micro-batches every few minutes. Often I move only one pipeline to streaming and keep the rest in batch. I always ask: what is the cost of waiting one hour for this data?
What does it mean for a pipeline to be idempotent, and how do you achieve it?
ماذا يعني أن يكون خط المعالجة idempotent، وكيف تحقق ذلك؟
ما الذي يريد المحاور سماعه. تعريف واضح، ومشكلة التكرار عند إعادة المحاولة، وتقنيات محددة مثل الكتابة فوق قسم (partition) كامل أو الدمج (merge) على مفتاح.
نموذج إجابة بالإنجليزية للتدرّب عليه بصوت عالٍAn idempotent job gives the same result if I run it once or ten times with the same input. This matters, because jobs fail and we rerun them, and backfills are a normal part of the work. A bad job appends rows on every run, so a retry creates duplicates. To make it safe, I overwrite the whole partition for one date, or I use a merge, also called an upsert, with a stable business key. I pass the run date as a parameter and do not use the current time inside the logic. I also write to a temporary location and swap the result in only when the job succeeds.
How do you make sure the data in your pipelines is correct?
كيف تتأكد من صحة البيانات في خطوط المعالجة لديك؟
ما الذي يريد المحاور سماعه. فحوص في عدة مراحل، وقرار بما يوقف خط المعالجة، وملكية واضحة للبيانات.
نموذج إجابة بالإنجليزية للتدرّب عليه بصوت عالٍI check the data at several points, not only at the end. At ingestion, I check the schema, so a changed column does not break everything silently. After each transformation, I run tests: not null, unique keys, accepted values, row counts compared with the source, and freshness. If a critical check fails, the pipeline stops and does not publish bad data, and the owner gets an alert. For smaller problems, I quarantine the bad records instead of deleting them. I also agree on a contract with the data producers, so they tell us before they change a field. And every dataset has an owner.
What is partitioning, and how do you choose a partition key?
ما التقسيم (partitioning)، وكيف تختار مفتاح التقسيم (partition key)؟
ما الذي يريد المحاور سماعه. تقليم الأقسام (partition pruning)، ومفتاح معقول مثل التاريخ، ومشكلة كثرة الأقسام أو الملفات الصغيرة.
نموذج إجابة بالإنجليزية للتدرّب عليه بصوت عالٍPartitioning splits a large table into smaller parts, usually by one column, so queries read only the parts they need. The most common key is the event date, because most queries filter by time, and it also makes retention and backfills easy: I can drop or rewrite one day. A good key has a reasonable number of values. If I partition by user ID, I get millions of tiny files, and everything becomes slow. If the partitions are too big, I lose the benefit. I also keep the files at a healthy size, and I check in the query plan that my filter really skips the partitions I do not need.
كيف تنطق المصطلحات الأساسية
- pipeline
- بَايْبْلَايْن
- data lake
- دَيْتَا لَيْك
- warehouse
- وِيرْهَاوْس
- idempotent
- أَيْدِمْبُوتِنْت
- schema
- سْكِيمَا
- partition
- بَارْتِشِن
- orchestration
- أُورْكِسْتْرَيْشِن
عبارات مفيدة للإجابة
- The pipeline reads from… and writes to…يقرأ خط المعالجة من… ويكتب إلى…
- It runs every night, and a rerun is safe.يعمل كل ليلة، وإعادة التشغيل آمنة.
- The main trade-off is freshness against cost.المفاضلة الرئيسة هي بين حداثة البيانات (freshness) والكلفة.
- We validate the data before we publish it.نتحقق من البيانات قبل أن ننشرها.
- I would add a check and an alert here.كنت سأضيف هنا فحصًا وتنبيهًا.
- Who owns this dataset?من يملك مجموعة البيانات هذه؟
- Let me describe the data flow from the source to the dashboard.دعني أصف تدفق البيانات من المصدر إلى لوحة المعلومات.
أخطاء شائعة
- قول "datas" أو "informations". كلتا الكلمتين غير معدودة في الإنجليزية العادية: قل "a lot of data" أو "some information" أو "a data point". وجمعهما في العربية («بيانات» و«معلومات») هو سبب شيوع هذا الخطأ.
- قول "the job is failed". الصيغتان الصحيحتان هما "the job failed" أو "the job has failed".
- سرد أدوات مثل Airflow وSpark وKafka دون قول المشكلة التي تحلّها كل منها. سمِّ المشكلة أولًا، ثم الأداة.
- القول إن المعالجة المتدفقة (streaming) أفضل دائمًا لأنها في الوقت الفعلي. اشرح الكلفة واسأل هل يحتاج العمل فعلًا إلى بيانات حديثة.
- نسيان الفشل. قل ما يحدث عندما تفشل مهمة في منتصفها، أو تصل البيانات متأخرة، أو يصل الملف نفسه مرتين.
الأسئلة الشائعة
هل أحتاج إلى معرفة Spark لمقابلة هندسة بيانات؟
غالبًا نعم على مستوى أساسي: كيف يُقسَّم العمل على عنقود (cluster)، ولماذا يكون نقل البيانات بين العقد مكلفًا. وإذا كان فريقك الأخير يستخدم SQL ومستودع بيانات فقط، فقل ذلك بصدق واشرح ما الذي ستتعلمه أولًا.
كم من SQL سأُسأل عنه؟
عادةً الكثير. توقّع ربطًا (joins) وتجميعًا ودوال نافذة (window functions) على شاشة مشتركة أو على ورقة. قل خطتك بصوت عالٍ قبل أن تكتب: "First I deduplicate the events, then I group them by day."
كيف أصف خط معالجة تفاصيله سرية؟
صِفه بعبارات عامة: نوع المصدر، والحجم التقريبي، والجدول الزمني، والفحوص، وشيء واحد تعطّل. يهتم المحاورون بطريقة تفكيرك لا بالأسماء أو أرقام الشركة الدقيقة.
قراءة الإجابة ليست مثل قولها. تدرّب على كل سؤال بصوت عالٍ، ثم قارن معنى إجابتك ولغتها بالنموذج.
جرّب SpeakRole ↗موضوعات أخرى في هذا المجال