Skip to main content

Marking a Table or View for Data Permissions

An Analytics Environment user can mark a table or view in BigQuery for data permissions if they are stored in the _pub dataset.

This allows users with the LSH Admin persona to create a permission so that a partner can use that table or view in the Analytics Environment for the specified use cases and time range. See "Create a Permission for a Table or View".

Caution

Once the permission reaches the end date, the table or view will be deleted from the partner's Analytics Environment. However, any data contained in tables, audiences, or any other file types that use the original table or view cannot be deleted.

When creating a data permission to make your Analytics Environment data available to a partner to use in their Analytics Environment, you should typically only give your partner access to a portion of the main table populated by your data feed, such as the following approaches:

  • Create a data permission for a table that consists of the subset of your data

  • Create a data permission for a portion of your transaction table through a view

A BigQuery table row contains individual records and columns that organize each row's information into fields.

Every table is defined by a schema that describes the column names, the data types, and other information. You can specify the schema of a table when it is created. Alternatively, create a table without a schema and then declare a schema in the query job or load job that first populates it with data.

A view is a virtual table defined by a SQL query. When you create a view, you query it in the same way you query a table. When a user queries the view, the query results only contain data from the tables and fields specified in the query that defines the view.

A table is a "static" connection to a table (the table will not update along with the transaction table) unless you do further engineering work to ensure the new table will update. A view is a "live" connection because it references the original table that is being updated by the data feed.

The performance of tables and views may differ. A view is a query, so if you write a complex query to populate the view and then write another complex query to query the view, performance might be negatively impacted.

A table is simpler: you just query the object directly. So if you write a complex query, there's no additional complexity added by the object because it is already defined in itself.

Procedure. To mark a table of view for data permissions:
  1. With the desired table or view open in the BigQuery Query Editor, select the Details tab (the example below shows marking a table).

    Analytics_Environment_Send_Segment_details_tab.jpg
  2. Click Edit Details.

    Analytics_Environment_Send_Segment_edit_labels_icon.jpg
  3. From the Edit detail dialog, click + Add Labels.

    Analytics_Environment_Send_Segment_add_label_button.jpg
  4. Enter the following values, and then click Save:

    LSH_AE-Mark_Table_or_View_for_Permissioning-_enter__label__values.jpg
    • key: "permission"

    • Value 1: "ready"

The table or view will be available on the My Tables & Views page in 5 or 10 minutes. A user with the LSH Admin persona can then grant permissions for that table or view to a partner.