Automation & Scripting Flashcards
7 cards from real CDT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Automation & Scripting flashcards as text
A document automation pipeline needs to digitally sign PDFs using a company certificate. Which signing standard is recommended for long-term validity of the signature?
Answer: PAdES with an embedded trusted timestamp (LTV — Long-Term Validation)
PAdES-LTV embeds the certificate chain, OCSP responses, and a trusted timestamp, allowing the signature to be verified even after the signing certificate expires.
When writing a script to extract tables from scanned PDF documents, which two technologies are typically combined?
Answer: OCR to recognize text and table-detection algorithms to identify cell boundaries
Scanned PDFs lack machine-readable text, so OCR converts the image to text, while table-detection logic (rule-based or ML) identifies rows and columns.
A Robotic Process Automation (RPA) bot processes insurance claims documents but fails when a new document layout is introduced. This is an example of which common RPA challenge?
Answer: Fragility to UI or layout changes (brittle automation)
RPA bots that rely on fixed screen coordinates or element paths break when the document layout or application UI changes — a well-known fragility of traditional RPA.
In a document generation script, what is the role of a 'data mapper' or 'transformation layer'?
Answer: To convert source data (e.g., from a database or API) into the structure expected by the document template
A transformation layer normalizes, reformats, and maps raw source data to the field names and data types that the document template expects.
Which Python library is most widely used for programmatically creating and modifying PDF documents from scratch (not converting from other formats)?
Answer: ReportLab
ReportLab's open-source PDF toolkit allows Python scripts to create PDFs programmatically, controlling layout, fonts, graphics, and content.
A script must redact all dates from legal documents before sharing. After applying regex-based redaction, a QA review finds some dates were missed. What is the MOST likely reason?
Answer: The regex pattern did not account for all date formats present in the documents (e.g., 'January 5th, 2024' vs '01/05/2024')
Dates appear in many formats; a regex targeting MM/DD/YYYY will miss spelled-out months, ISO dates, or non-standard separators.
What is the advantage of using a message queue (e.g., RabbitMQ or AWS SQS) to decouple document ingestion from processing in an automation pipeline?
Answer: It allows ingestion and processing to scale independently and prevents data loss if the processor temporarily goes offline
Message queues buffer incoming documents, so a spike in ingestion volume does not overwhelm the processor, and documents are not lost during processing downtime.