> ## Documentation Index
> Fetch the complete documentation index at: https://www.datalegion.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake

> Query Data Legion people and company data on Snowflake Marketplace, get the free company dataset, or enrich your tables with the Data Legion Enrich app.

Data Legion's [Snowflake Marketplace](https://app.snowflake.com/marketplace) offering comes in three forms:

* **Data products**, shared as tables you query in your own account: six tiers of people and company data, the same split as the Data Legion API.
* **Company Firmographics (Free)**, a free company dataset.
* **Data Legion Enrich**, a Snowflake Native App that enriches a table in your account without the table leaving it.

Nothing is copied into your account. A shared database reads our tables in place, and the app runs inside your account on your warehouse.

<Note>
  The listings are not live yet. This page describes them ahead of launch. To talk about access or a custom sample now, email [support@datalegion.ai](mailto:support@datalegion.ai).
</Note>

## Prerequisites

* A Snowflake account in a region the listings are available in
* A role that can get Marketplace listings (`ACCOUNTADMIN`, or a role with `IMPORT SHARE` and `CREATE DATABASE`)
* A warehouse to run queries or the app on

## Data products

| Listing | Schema | What it has |
| - | - | - |
| Professional Profiles (Base, No Contact Data) | `person_base_no_pii` | Names, current role and employer, work history, education, skills, languages, social profile URLs for 188M+ US professionals |
| Professional Profiles (Premium, No Contact Data) | `person_premium_no_pii` | The Base profiles plus seniority, job function, decision-maker flags, certifications and quality metadata |
| B2B Contacts (Base) | `person_base_pii` | The Base profiles plus work email, mobile phone, every email and phone with its type, postal addresses, birth date, age and sex |
| B2B Contacts (Premium) | `person_premium_pii` | Everything: scored contacts, email hashes, geocoded locations and the Premium profile fields |
| Company Firmographics (Base) | `company_base` | Name, domains, industry, size, type, founding year, tickers, social profiles and descriptions for 71M+ companies worldwide |
| Company Firmographics and Workforce Trends (Premium) | `company_premium` | The Base firmographics plus headcount history, hires, departures, growth, turnover and workforce makeup |

Need a sample cut to your own industry, region or role? Email [support@datalegion.ai](mailto:support@datalegion.ai) and we share one privately with your Snowflake account.

### Tables

Each listing is one schema laid out like our API database. Tables join on `legion_id`.

* People: `people` (one row per person), and `experience`, `education`, `skills`, `languages`, `socials` and more, one row per item. The contact tiers add `emails`, `phones` and `locations`.
* Companies: `companies` (one row per company), and `company_domains`, `company_socials` and more. Company Premium adds monthly history such as `company_legion_employee_count_by_month`.
* A person's `company_legion_id` is the `legion_id` of their current company in the company products.

Column descriptions are set as Snowflake column comments, so they show in Snowsight and in `DESCRIBE TABLE`. The [Person Fields](/docs/person-data/fields) and [Company Fields](/docs/company-data/fields) references describe the same fields.

### Querying

Text values are stored lower case, as in the [field reference](/docs/person-data/fields) and [enums](/docs/enums) (display fields such as `name_display` keep their case): `type = 'professional'`, `state = 'california'`, `industry = 'software development'`. `CURRENT` is a reserved word in Snowflake, so quote the column: `e."CURRENT"`. Rates are fractions: a `legion_employee_growth_rate_12m` of 1.24 is growth of 124%.

People at a company, with every current work email (contact tiers):

```sql theme={null}
SELECT p.legion_id, p.full_name, p.job_title, e.address AS work_email
FROM person_base_pii.people p
JOIN person_base_pii.emails e ON e.legion_id = p.legion_id
WHERE p.company_domain = 'snowflake.com'
  AND e.type = 'professional' AND e."CURRENT"
ORDER BY p.full_name
LIMIT 100;
```

People with a skill, in one state (contact tiers, which carry location):

```sql theme={null}
SELECT p.full_name, p.job_title, p.company_name, p.city
FROM person_base_pii.people p
WHERE p.state = 'california'
  AND EXISTS (
    SELECT 1 FROM person_base_pii.skills s
    WHERE s.legion_id = p.legion_id AND s.cleaned = 'python'
  )
LIMIT 100;
```

A company's monthly headcount, hires and departures (Company Premium):

```sql theme={null}
SELECT m.month, m.count AS employees, m.hires, m.departures, m.growth_rate
FROM company_premium.companies c
JOIN company_premium.company_legion_employee_count_by_month m
  ON m.legion_id = c.legion_id
WHERE c.domain = 'snowflake.com'
ORDER BY m.month;
```

People joined to their company, across a person listing and a company listing. Replace the database names with the ones you gave each listing when you got it:

```sql theme={null}
SELECT p.full_name, p.job_title, c.name_display, c.size,
       c.legion_employee_growth_rate_12m
FROM person_db.person_base_pii.people p
JOIN company_db.company_premium.companies c
  ON c.legion_id = p.company_legion_id
WHERE c.domain = 'snowflake.com'
LIMIT 100;
```

### Refreshes

The data is rebuilt every month, and the shared tables switch to the new build in place, so your queries pick it up without any change on your side. `legion_id` carries over from one build to the next for nearly every record: an ID changes only when records are merged, split or removed. Opt-outs are applied every build.

## Company Firmographics (Free)

Company Firmographics (Free) is free to get, with no request. It covers companies worldwide, every one with a domain, a LinkedIn URL, an industry and a size range, plus company type and founding year where we have them. The schema is `company_free`, with one table, `companies`. It is refreshed every quarter.

```sql theme={null}
SELECT size, COUNT(*) AS companies
FROM company_free.companies
WHERE industry = 'software development'
GROUP BY size
ORDER BY companies DESC;
```

Each company has the same `legion_id` the paid company products use, so it joins straight to them when you need more. It is free for internal and commercial use with attribution, and may not be resold or redistributed as a dataset.

## Data Legion Enrich (Native App)

The app matches the rows of a table in your account against our data and writes the matches to a table you can read. Your table stays in your account, and you pay per matched record. Rows with no match cost nothing.

### Products and identifiers

`SELECT * FROM <app>.core.products;` lists the six products with their price per matched record: Person Base and Person Premium, each with or without contact data, and Company Base and Company Premium.

| Identifier type | Matches |
| - | - |
| `email` | A person by email address |
| `email_sha256`, `email_sha1`, `email_md5` | A person by the SHA-256, SHA-1 or MD5 hash of a normalized email address |
| `phone` | A person by phone number |
| `linkedin_url` | A person by LinkedIn profile URL |
| `domain` | A company by domain |
| `company_linkedin_url` | A company by LinkedIn company URL |

Values are normalized by the same rules as the Data Legion API, so a value matches in the app exactly when it would match there. When a value belongs to more than one person or company, the app returns the record the API would return.

### Running it

```sql theme={null}
-- Let the app read the table you want enriched.
GRANT USAGE ON DATABASE my_db TO APPLICATION <app>;
GRANT USAGE ON SCHEMA my_db.public TO APPLICATION <app>;
GRANT SELECT ON TABLE my_db.public.leads TO APPLICATION <app>;

-- product, table, ID column, identifier column, identifier type, result table name
CALL <app>.core.enrich(
  'person_base_pii', 'my_db.public.leads', 'id', 'email', 'email', 'leads_enriched'
);

-- One row per matched input: INPUT_ID, LEGION_ID, RECORD (an OBJECT)
SELECT * FROM <app>.results.leads_enriched;
```

Each input row matches at most one person or company. `RECORD` holds the product's fields for the match, keyed by column name in upper case (read one with `RECORD:NAME_CLEANED::string`), and its contents follow the [Person Schema](/docs/person-data/schema) or [Company Schema](/docs/company-data/schema).

### Cost and speed

The app runs on your warehouse, so you pay Snowflake for the compute and Data Legion for the matches. A run reads the product's tables once, so it takes about the same time for a thousand rows as for a million: a few minutes on an X-Small warehouse for a person product, and under a minute for a company product. A larger warehouse finishes proportionally faster for about the same compute cost.

## Snowflake or the Data Legion API

Snowflake fits analytics and data teams who want the data next to their own tables: joins, segments, model training, and enrichment of tables that already live in Snowflake. Real-time enrichment inside your own systems, search, natural-language discovery, and bulk files delivered to S3, Google Cloud Storage, Azure Blob Storage or SFTP are on the [Data Legion API](/docs/api-reference/overview) and [delivery formats](/docs/getting-started/delivery-formats).

Every Data Legion product excludes people who have opted out, and contact data is for lawful use under our [Acceptable Data Use policy](https://www.datalegion.ai/legal/acceptable-data-use).

## Related

* [Person Fields](/docs/person-data/fields) and [Company Fields](/docs/company-data/fields)
* [Snowflake: Access listings as a consumer](https://docs.snowflake.com/en/collaboration/consumer-listings-access)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.