DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Maximize Your Analytics Potential With Server-Side Tracking and Google Analytics 4 Integration
  • Understanding Google Analytics 4, Server-Side Tracking, and GDPR Compliance
  • Google Analytics 4: 7 Biggest Pitfalls of the Revamped GA
  • Apache Spark 4.0: Transforming Big Data Analytics to the Next Level

Trending

  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • The Role of AI in Identity and Access Management for Organizations
  • What’s Got Me Interested in OpenTelemetry—And Pursuing Certification
  • Monoliths, REST, and Spring Boot Sidecars: A Real Modernization Playbook
  1. DZone
  2. Data Engineering
  3. Data
  4. Data Sharing Using Google Analytics Hub

Data Sharing Using Google Analytics Hub

In this tutorial, we will take an in-depth look at Google Analytics Hub, a tool to securely share and access data, simplifying collaboration and analysis

By 
Karteek Kotamsetty user avatar
Karteek Kotamsetty
·
Jan. 16, 25 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
12.1K Views

Join the DZone community and get the full member experience.

Join For Free

Google Cloud Analytics Hub is a tool built on BigQuery that enables seamless data sharing across the organization by making it easier to share and access datasets. Analytics Hub makes it easy to discover public, private, and internally shared data sources. 

Accessing Public Datasets in Analytics Hub

Navigate to the Google Cloud console using the URL "https://console.cloud.google.com," search for BigQuery, and select BigQuery.

Select BigQuery

In the BigQuery console, click on Analytics Hub, and click on Search Listings.

Click on SEARCH LISTINGS

Search for trees to search for listings named "trees" and click on Street Trees Listing.

Click on Street Trees Listing

Click on Subscribe to subscribe to the listing.

Click on SUBSCRIBE

Select the desired project for your linked dataset by clicking on Browse. Once you've made your selection, provide the linked dataset name and click Save to continue.

Provide the linked dataset name and click Save to continue

Click on Go to Linked Dataset.

Click on GO TO LINKED DATASET

Expand the street_trees dataset in BigQuery, select the street_trees table, click on Query, and click on In new tab.

Click on In new tab

Add “*” to the Query and click Run. 

It's that simple to query linked datasets in BigQuery.

Results

Creating Dataset in BigQuery

In BigQuery, datasets provide a logical structure for managing tables and views within a project. Before loading data into BigQuery, users must create at least one dataset to store their tables or views.

Navigate to BigQuery Studio and click on Create Dataset to create dataset in BigQuery.

Create Dataset in BigQuery


Specify the Dataset ID as dzone-dataset, then click on Create Dataset.

Specify the Dataset ID as dzone-dataset

Creating a Table in BigQuery

BigQuery organizes data in Tables where data is stored in rows and columns. 

In BigQuery Studio, run the Query below by clicking on Run.

Plain Text
 
CREATE OR REPLACE TABLE `dzone_dataset.analytics_hub_table` AS
SELECT *
FROM `dzone-tutorial.street_trees.street_trees` LIMIT 1000


The new table 'analytics_hub_table' is created

Notice that the new table 'analytics_hub_table' is created.

Creating Analytics Hub Data Exchange

Data exchanges streamline data sharing by providing a structured environment for publishing and accessing data. Data exchange is a catalog of available datasets. Analytics Hub allows publishers and administrators to manage subscriber access at both the exchange and the listing levels. The Analytics Hub subscriber can browse data exchanges, discover accessible data, and subscribe to the shared resources. This method eliminates the requirement to explicitly grant access to the underlying shared resources. 

When creating a data exchange, a primary contact email can be assigned, providing a means for users to contact the owner with questions or concerns about the data exchange.

Click on Create Exchange to create an exchange in Analytics Hub.


Specify the Display Name as the name you want to specify for the exchange. Users can click on the Toggle to make the exchange publicly discoverable. Click on Create Exchange.

Specify the Display Name as the name you want to specify to the exchange

Users can specify the administrators for exchange who can manage the listings, specify the publishers who can publish and manage the listings, specify the subscribers who can subscribe to the listings, or specify viewers who can view listings and exchange permissions. We can click on Skip.

You can click on SKIP

Notice the dzone-tutorial-exchange has been created. Click on the dzone-tutorial-exchange. 

Click on the dzone-tutorial-exchange

Listing is a dataset that we want to share with Analytics Hub and a listing could be a public listing or private listing. 

Click on Create Listing.

Click on CREATE LISTING

Select the Resource Type as BigQuery Dataset, select the dataset we have created earlier by typing the dataset name, in our example we will select dzone-tutorial.dzone_dataset. Click on Next.


Provide the Display Name as Analytics Hub Sample Trees Data. In the markdown provide the code "# Sample Dataset For Trees Data" and click on Next.


In Analytics Hub, the Publisher should have an Analytics Hub Listing Admin role or Analytics Hub Publisher role to create the listing. 

We can provide the listing contact information, such as primary contact, provider name, and publisher name, by clicking on Next.

In this example, we are leaving it empty.

List contact information

Click on Publish.

Click on PUBLISH

Click on Search Listings to search for our published listing.

Click on SEARCH LISTINGS

Search for dzone and click on the Analytics Hub Sample Trees Data tile.

Search for dzone and click on the Analytics Hub Sample Trees Data tile

To discover and subscribe to the listings the user should have the Analytics Hub subscriber role.

If you are logged into Analytics Hub as a user that has Analytics Hub subscriber then we can click on Subscribe.

Click SUBSCRIBE

Specify the linked dataset name as sample_analytics_hub_sample_trees_data and click on Save.

Specify the linked dataset name as sample_analytics_hub_sample_trees_data

Click on Go to Linked Dataset.

Click on GO TO LINKED DATASET

Click on the analytics_hub_table and click on Query.

Click on Query

Add * to the Query and click on Run. Notice that we are able to see the linked dataset.

We are able to see the linked dataset

This is how data is published and subscribed to Analytics Hub.

Summary

Google Analytics Hub provides a secure and seamless way to share and access datasets, both public and private. Built on BigQuery, Google Analytics Hub simplifies data sharing by allowing users to easily create and subscribe to listings, making data readily available for analysis within their projects.

Analytics Data sharing Google (verb)

Opinions expressed by DZone contributors are their own.

Related

  • Maximize Your Analytics Potential With Server-Side Tracking and Google Analytics 4 Integration
  • Understanding Google Analytics 4, Server-Side Tracking, and GDPR Compliance
  • Google Analytics 4: 7 Biggest Pitfalls of the Revamped GA
  • Apache Spark 4.0: Transforming Big Data Analytics to the Next Level

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!