> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/apis/using-notebooks-with-data-quality-observability-classic/advanced-options.md).

# Advanced options

This topic contains examples of advanced programmatic options and techniques using notebooks.

### Run all activities in one line

For brevity and convenience, you can load a dataframe in the constructor and, in one line, run all nine dimensions of data quality `cdq.owlcheck()`. To adjust the DQ dimensions, simply set the properties in the `props` object.

```
val cdq = Util.OwlContext(df, atmCustFileDF, opts)
cdq.owlCheck()
```

#### Example property settings

```
val props = new Props()
props.filePath = s"${filePath}/atm_customer_${rd.replace("-","_")}.csv"
props.runId = rd
props.dateCol = "OWL_RUN_ID"
props.dataset = "ATM_CUSTOMER3"
props.del = ","
props.datasetSafety = false
props.calculateBoundaries = true
props.fileLookBack = true
props.timeBin = "DAY"
 
// outlier, missing records
props.dl = true
props.dlKey = "customer_id"
props.dlLb = 4
 
// pattern mining
props.freqPatternMiningByKey = true
props.fpgKey = "customer_id"
props.fpgLookback = 4
props.fpgDateCol = "OWL_RUN_ID"
props.fpgCols = "card_number,first_name,last_name,checking_savings"
props.fpgLowFreq = true
 
// validate Src
props.validateSrc = true
props.valSrcKey = "customer_id"
 
// fuzzy match
props.isDupe = true
props.dupeCutOff = 88
props.depth = 3
props.dupeExcludeCols = "customer_id,card_number,customer_since_date,OWL_RUN_ID"
```

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-1a521c1d7b5f846669fcddc8761a088b9279f9a5%2Fowl-spark-dq%3Dpipeline.png?alt=media)

## Enable multi-tenancy for notebook APIs

The following Scala code enables multi-tenancy for notebook APIs by setting up database connection parameters and assigning them to the opt object. In this example, "finance" is the name of the non-public tenant for Collibra DQ.

```
// Enable Multi Tenancy for Notebook API
val tenantName = "finance"
val pgHost = "xxxx.amazonaws.com"
val pgDatabase = "postgres"
val pgSchema = "public"
val pgUser = "???????" 
val pgPass = "????"
val pgPort = "0000"
 
// Assign these values to the opt object
val opt = new OwlOptions()
opt.port = s"jdbc:postgresql://$pgHost:$pgPort/$pgDatabase?currentSchema=$tenantName"
```

After you run the job, check the specific tenant's job page for the results.
