# Combined Enrichment

Person and company profile in one lookup, from an email.

**Credits:** 2 search credits when found. Lookups that find nothing cost nothing. See [Pricing and limits](/snowflake/pricing-and-limits).

## Inputs and options

Input: `email` (Email address)

This tool has no options.

## Try one value

```sql
CALL TOMBA.core.combined_enrichment('jane.doe@acme.com');
```

The call returns the result as a `VARIANT` (example values, shortened):

```json
{
    "status": "found",
    "credits": 2,
    "results": [
        {
            "FULL_NAME": "Jane Doe",
            "TITLE": "Head of Sales",
            "COMPANY_NAME": "Acme",
            "COMPANY_EMPLOYEES": "51-200",
            "COMPANY_COUNTRY": "United States"
        }
    ]
}
```

`status` is `found`, `not_found`, `invalid` or `error`; `results` holds the output columns and `data` the complete
Tomba record.

## Run it over a table

Create a small table to try it (or use one of yours, after [granting the app access](/snowflake/installation#3-let-the-app-read-your-tables)):

```sql
CREATE OR REPLACE TABLE my_db.public.signups (EMAIL STRING);
INSERT INTO my_db.public.signups VALUES
    ('jane.doe@acme.com');
GRANT USAGE ON DATABASE my_db TO APPLICATION TOMBA;
GRANT USAGE ON SCHEMA my_db.public TO APPLICATION TOMBA;
GRANT SELECT ON TABLE my_db.public.signups TO APPLICATION TOMBA;
```

Run the tool, then read the results:

```sql
CALL TOMBA.core.enrich_combined('MY_DB.PUBLIC.SIGNUPS', 'EMAIL', 'SIGNUPS_COMBINED_ENRICHMENT', 100);

SELECT INPUT_EMAIL, FULL_NAME, TITLE, ROLE, COMPANY_NAME, COMPANY_EMPLOYEES, COMPANY_COUNTRY
  FROM TOMBA.results.SIGNUPS_COMBINED_ENRICHMENT
 WHERE lookup_status = 'found';
```

Signature: `enrich_combined(input_table STRING, email_column STRING, output_table STRING, max_rows INT DEFAULT 100000)`

## Output columns

Each row has your `INPUT_<name>` columns, the tool's columns, and the common columns (`LOOKUP_STATUS`,
`CREDITS`, `DATA`, …). Every column, with its type and values: [Output columns](/snowflake/reference/output-columns#combined-enrichment).

## Tips

- Costs 2 credits when found, the same as Person Enrichment plus Company Enrichment, in one call.

## Related

- [Person Enrichment](/snowflake/tools/person-enrichment)
- [Company Enrichment](/snowflake/tools/company-enrichment)
