How to mine Google BigQuery

Once you have crawled assets from Google BigQuery, you can mine its query history to construct lineage.

To mine lineage from Google BigQuery, review the order of operations and then complete the following steps.

Select the miner

To select the Google BigQuery miner:

  1. In the top right of any screen, navigate to New and then click New Workflow.
  2. From the filters along the top, click Miner.
  3. From the list of packages, select BigQuery Miner and then click Setup Workflow.

Configure the miner

To configure the Google BigQuery miner:

  1. For Connection, select the connection to mine. (To select a connection, the crawler must have already run.)
  2. For Miner Extraction Method, select Query History.
  3. For Start time, choose the earliest date from which to mine query history.
    đź’Ş Did you know? The miner restricts you to only querying the past two weeks of query history. If you need to query more history, for example in an initial load, consider using the S3 miner first. After the initial load, you can modify the miner's configuration to use query history extraction.
  4. (Optional) By default, the miner fetches data from the US region. To fetch data from another region, for Region, select Custom and then enter the region where your INFORMATION_SCHEMA is hosted under Custom BigQuery Region. Enter the region in the following format region-<REGION>, replacing <REGION> with your specific region — for example, europe-north1.
  5. To check for any permissions or other configuration issues before running the miner, click Preflight checks.
  6. At the bottom of the screen, click Next to proceed.
🚨 Careful! If running the miner for the first time, Atlan recommends setting a start date roughly three days prior to the current date and then scheduling it daily to build up to two weeks of query history. Mining two weeks of query history on the first miner run may cause delays. Atlan requires a minimum lag of 24 to 48 hours to capture all the relevant transformations that were part of a session. Learn more about the miner logic here.

Configure the miner behavior

To configure the Google BigQuery miner behavior:

  1. (Optional) For Calculate popularity, change to True to retrieve usage and popularity metrics for your Google BigQuery assets from query history:
    1. To select a pricing model for running queries, for Pricing Model, click On Demand to be charged for the number of bytes processed or Flat Rate for the number of slots purchased.
    2. For Popularity Window (days), 30 days is the maximum limit. You can set a shorter popularity window of less than 30 days.
    3. For Excluded Users, type the names of users to be excluded while calculating usage metrics for Google BigQuery assets. Press enter after each name to add more names.
  2. (Optional) For Control Config, click Custom to configure the following:
    1. For Fetch excluded project's QUERY_HISTORY, click Yes to mine query history from databases or projects excluded while crawling metadata from Google BigQuery.
    2. If Atlan support has provided you with a custom control configuration, enter the configuration into the Custom Config box. You can also:
      • (Optional) Enter {“ignore-all-case”: true} to enable crawling assets with case-sensitive identifiers.

Run the miner

To run the Google BigQuery miner, after completing the steps above:

  • To run the miner once immediately, at the bottom of the screen, click the Run button.
  • To schedule the miner to run hourly, daily, weekly, or monthly, at the bottom of the screen, click the Schedule & Run button.

Once the miner has completed running, you will see lineage for Google BigQuery assets that were created in Google BigQuery between the start time and when the miner ran! 🎉

Related articles

Was this article helpful?
1 out of 1 found this helpful