top of page

The UnionAll Blog

Insights and ideas on all things data, from innovation to implementation.

To achieve data-driven decision-making, businesses often encounter a shared hurdle - efficiently translating raw data into actionable insights. A second challenge is how to successfully forecast future market demands.


Example: Data Driven Decisions for Manufacturing Company

Imagine a small cap manufacturing company, standing at the crossroads of this common data dilemma. The management team, in pursuit of robust benchmarking and strategic growth insights, wants to both get a better grasp of their internal data to improve processes, while including 3rd party data to understand how the company performs in relation to market peers.


To bridge the gap between raw data and graspable insights, the introduction of STOIX Metrics emerges as a possible solution. Designed to streamline the process of data structuring, making it possible for management to point at data sources and connect them to the visualization tool.

STOIX Metrics is a plug-and-play metrics tool for a variety of common data sources, where customer data from the CRM system can be viewed together with financial data and order data from other systems. By also connecting STOIX to the 3rd party datasets acquired through UnionAll DataHub, internal metrics can be benchmarked and compared against market data.


Not only does the company have a better understanding of their actual performance, and through a fundamental understanding of their development over time, but they can also correctly benchmark against their market competitors and properly analyze the over- and underperformance to better understand where opportunities for improvement lie.


3rd party data for deeper insights

Implementing the UnionAll Data Marketplace, a transformative force in the data ecosystem, to search for and access relevant third party datasets - opens a new possibility for market forecasting. Our centralised platform, containing a diverse variation of 3rd party data products, presents an opportunity for businesses to overcome the challenges of benchmarking - and tap into valuable third-party insights.


The combination of better oversight and new data sources presenting a stronger benchmarking opportunity, and forecasting makes better decision making more accessible for management. Intertwining UnionAll and STOIX Metrics helps the imagined small cap manufacturing company get easy access to important operational data and relevant company KPIs, while also incorporating peer benchmarking and forecasting.

Shortlist of things to get started (TLDR)

  1. Download the Snowflake Native App

  2. Fetch your API-key from UnionAll

  3. Create an external function in Snowflake

  4. When prompted specify the function in the app

Download the Snowflake App!

💡 You currently have to have a snowflake account with AWS as cloud provider in a non gov- region.

  • Login to your snowflake account

  • Install the app

Fetch your API key:

  • Go to UnionAll > Login with Google or Microsoft.

  • Press on your profile in the top right corner

  • Press "Get API key" to generate the key

💡 Make sure you save the API-key in a secure location


Create a function and integration in snowflake

Copy the following code into a snowflake worksheet

//Choose schema and database:
use schema <database>.<schema>;

// Store your API key:
CREATE SECRET UNIONALL_API_KEY
    TYPE = GENERIC_STRING
    SECRET_STRING = '<your-api-key>';

// Create network rule:
CREATE NETWORK RULE UNIONALL_API_NETWORK_RULE
    MODE = EGRESS
    TYPE = HOST_PORT
    VALUE_LIST = ('snowflake-gateway.cloud.unionall.ai');

// Create external access integration (Allows external access):
CREATE EXTERNAL ACCESS INTEGRATION UNIONALL_EXTERNAL_INTEGRATION
    ALLOWED_NETWORK_RULES = (UNIONALL_API_NETWORK_RULE)
    ALLOWED_AUTHENTICATION_SECRETS = (UNIONALL_API_KEY)
    ENABLED = true;

// Create query-function (wrapper function for calling the api)
CREATE SECURE FUNCTION UNIONALL_DATAPRODUCTS(query varchar)
    RETURNS STRING
    LANGUAGE PYTHON
    RUNTIME_VERSION = 3.9
    HANDLER = 'call_function'
    EXTERNAL_ACCESS_INTEGRATIONS = (UNIONALL_EXTERNAL_INTEGRATION)
    SECRETS = ('unionall_key' = UNIONALL_API_KEY)
    PACKAGES = ('requests','urllib3')
    AS
$$
import _snowflake
import json
import requests
from urllib.parse import urlencode
def call_function(QUERY):
    my_api_key = _snowflake.get_generic_secret_string('unionall_key')
    request_url = "<https://snowflake-gateway.cloud.unionall.ai/v1/snowflake/query>"
    n_results = 4
    headers = {
        "accept": "application/json",
        "Content-Type": "application/json",
        "X-API-Key": f"{my_api_key}",
    }
    req = requests.get(request_url + "?" + urlencode({"query":QUERY, "n_results": n_results}),headers=headers)
    return req.text
$$;

select UNIONALL_DATAPRODUCTS('I am looking for a dataset') as response;
  • Change the <database>.<schema> to your preferred location and replace <your-api-key> with your API-key key.

  • Execute the SQL in your worksheet!

  • You can test the api in your snowflake environment by running the following query in a worksheet select CALL_UNIONALL_API('Some search query')

💡 Make sure to note where you saved the function (you will be prompted to select it once you start the app)


Start the Snowflake app

  • When prompted choose your newly created function as a reference!

In today's rapidly evolving automotive landscape, access to comprehensive vehicle data is essential for stakeholders across the industry. Introducing the Comprehensive Vehicle Data Dataset, a rich repository of information providing detailed insights into registered vehicles. In this blog post, we'll delve into how this dataset, comprising over 16 million rows of data, can empower analysts, policymakers, and automotive professionals with valuable insights for various analytical purposes.


How can stakeholders leverage the Comprehensive Vehicle Data Dataset to derive actionable insights and drive decision-making? Let's explore some key applications:


  1. Market Analysis: Automotive manufacturers, dealerships, and market analysts can utilize the dataset to analyze market trends, consumer preferences, and competitive landscapes. Insights into vehicle types, brands, and technical specifications facilitate market segmentation and product positioning strategies.

  2. Fleet Management: Fleet operators and logistics companies can optimize vehicle selection, maintenance schedules, and route planning based on vehicle specifications, fuel efficiency, and performance metrics provided in the dataset, thereby improving operational efficiency and reducing costs.

  3. Consumer Insights: Automotive insurers, financial institutions, and consumer researchers can gain insights into vehicle ownership patterns, usage behaviors, and purchasing preferences, enabling them to tailor products and services to meet consumer needs effectively.


The Comprehensive Vehicle Data Dataset serves as a valuable resource for stakeholders seeking to gain a deeper understanding of the automotive landscape. By leveraging the insights derived from this dataset, analysts, policymakers, and industry professionals can make informed decisions, drive innovation, and address challenges in the automotive sector.


bottom of page