> For the complete documentation index, see [llms.txt](https://docs.snowddl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snowddl.com/basic/yaml-configs/share-outbound.md).

# SHARE (outbound)

Config path: `/outbound_share.yaml`

Example:

```yaml
test_share:
  accounts:
    - SFSALESSHARED.SFC_SAMPLES_AWS_EU_WEST_2
  grants:
    DATABASE:USAGE:
      - test_db
    SCHEMA:USAGE:
      - test_db.test_schema
    TABLE:SELECT:
      - test_db.test_schema.*
    FUNCTION:USAGE:
      - test_db.test_schema.test_secure_udf(varchar)
    DATABASE_ROLE:USAGE:
      - test_db.test_database_role

  comment: Test share

```

## Schema

* *{key}* (ident) - share name
* *{value}* (dict)
  * **accounts** (list)
    * {items} (ident) - identifiers of consumer accounts: `<organization>.<account>`.
  * **grants** (str)
    * *{key}* (str) - `<object_type>:<privilege>`
    * *{value}* (list)
      * *{items}* (ident) - full objects names or name patterns to grant privilege;
  * **share\_restrictions** (bool) - should be set to `false` in order to create SHARE from Business Critical account to accounts with lower edition;
  * **comment** (str)

## Usage notes

1. Outbound shares are processed if at least one share exists in config.
2. All changes to outbound shares are ["unsafe"](/guides/other-guides/safe-unsafe.md) and should be reviewed carefully, since it may expose data from your account to 3rd parties.
3. Outbound shares require additional privileges for [SnowDDL administration user](/guides/other-guides/admin.md): `IMPORT SHARE`, `CREATE SHARE`.
4. Parameter **share\_restrictions** requires additional privilege: `OVERRIDE SHARE RESTRICTIONS`.
5. All limitations related to [`GRANT ... TO SHARE`](https://docs.snowflake.com/en/sql-reference/sql/grant-privilege-share.html) command applies to **grants**. Please read it carefully.
6. It is possible to use [Unix-style wildcard patterns](https://docs.python.org/3/library/fnmatch.html) for grant object names.
7. Grants created externally and matching Unix-style wildcard patterns **will not be dropped** if objects are not explicitly defined in config. It is an intentional workaround for lack of future grants on shares.
8. You may create and grant [DATABASE ROLE](/basic/yaml-configs/database-role.md) to share using `DATABASE_ROLE:USAGE` privilege.

## &#x20;Links

* [CREATE SHARE](https://docs.snowflake.com/en/sql-reference/sql/create-share.html)
* [ALTER SHARE](https://docs.snowflake.com/en/sql-reference/sql/alter-share.html)
* [Override share restrictions](https://docs.snowflake.com/en/user-guide/override_share_restrictions.html)
* [Data providers](https://docs.snowflake.com/en/user-guide/data-sharing-core-tasks-providers.html)
* [Parser & JSON Schema (GitHub)](https://github.com/littleK0i/SnowDDL/blob/master/snowddl/parser/outbound_share.py)
