Search results

Connecting Bold BI to Amazon Athena data source

The Bold BI Dashboard Designer supports connecting to the Amazon Athena database using the SQL Live Query (C# API).

Choose an Amazon Athena data source

To choose an Amazon Athena data source, follow these steps:

  1. Click on Data Sources in the configuration panel to add a new data connection.

Data source icon

  1. Click CREATE NEW to launch a new connection from the connection panel.

Create new datasource

  1. Select the Amazon Athena connection in the connection panel.

Amazon Athena icon

NOTE: You can also create a data source from the home page by clicking on the Data Sources menu in the left menu panel and selecting Create Data Source from the data sources page.

Amazon Athena connector

Connect to Amazon Athena

The Amazon Athena data source can be accessed in Bold BI using the live connection mode.

Create Amazon Athena data source

After clicking on the data source, the NEW DATA SOURCE configuration panel opens. Follow the given steps to create an Amazon Athena data source:

  1. Enter a name and description (optional) for the data source.
  2. Choose the region endpoint of the server from the Region Endpoint drop-down.
  3. Enter the port in which the server is running in the AwsAccessKeyID text box.
  4. Enter a valid Amazon Athena secret key in the AwsSecretKey text box.
  5. Enter a valid output location for storing the output files in the Output location text box in the format mentioned in the tooltip.
  6. Select a database that you want to query in the listed database associated with the given Amazon Athena server in the database combo box.

Amazon Athena connection details

Data preview

  1. Click Connect to connect to the Amazon Athena server with the configured details. The schema represents the collection list retrieved from the Amazon Athena server. This dialog box displays a list of schemas in a tree view and their corresponding values.

Query designer page

  1. Now, the data design view page with the selected table schema opens. Drag the table.

Drag table

You can use the Code View option for passing a query to display data. Code view mode

  1. Click Save to save the data source with a relevant name.

NOTE: In the future, you can edit the connection information using the Edit Connection option.

Connect using custom attribute and dashboard parameter

We have added support for custom attributes and dashboard parameters in the data source connection. You can now connect to the data source using custom attributes or dashboard parameters.

Custom Attribute

Custom

Dashboard Parameter

Dashboard Parameter

Note: Please refer to the Dashboard Parameter Documentation and Custom Attributes Documentation for more details.

Connecting Bold BI to Amazon Athena Data Source via REST API

Prerequisites

The type while creating the data source needs to be amazonathena.

Rest API - v4.0

Parameters for creating Data Source

NOTE: The ability to provide join support is available only during the creation of a new data source. Join in edit connection mode is not supported.

Parameters Details
RegionEndpoint

required
string

Region in which the server is available

The region code must be provided. Examples: us-east-1, ap-south-1, and more. A list of available regions is provided in the following link.

The available AWS regions


AwsAccessKeyId

required
string

AWS access key of the account.
AwsSecretAccessKey

required
string

AWS secret key of the account.
OutputLocation



required
string

A valid S3 location to store the query results. Format: s3://bucketname/foldername

The following link explains the s3 output location in Athena and its usage.
Output location in the Athena
Database

required
string

database which needs to be connected
Schemaname

required for table mode
string

Enter a valid Schemaname which will mostly be the database name.
Tablename

required for table mode
string

Enter a valid Tablename
JoinType

Required For Join Info
string

Enter a valid JoinType For Example (Inner,Outer)
LeftTable

Required For Join Info
string

Enter a valid Left Table name
RightTable

Required For Join Info
string

Enter a valid Right Table name
LeftField

Required For Join Info
string

Enter a valid Left Table Column Name
RightField

Required For Join Info
string

Enter a valid Right Table Column Name
Condition

Required For Join Info
string

Enter a valid Condition For Example (AND,OR)
LeftField

Required For Join Info
string

Enter a valid Left Table Column Name
Operator

Required For Join Info
string

Enter a Valid Operator For Example (=,>=)
Value

Optional For only Join Info
string

Specifically choose the column values.
Query

required for code view mode
string

Enter a valid Query
AdvancedSettings

optional
string

Additional optional connection parameters can be provided. By default, it is empty.
Expressions

optional

`Array of Objects`



Parameters for edit the connection while upload the dashboard via API

Parameters Details
RegionEndpoint

required
string

Region in which the server is available

The region code must be provided. Examples: us-east-1, ap-south-1, and more. A list of available regions is provided in the following link.

The available AWS regions


AwsAccessKeyId

required
string

AWS access key of the account.
AwsSecretAccessKey

required
string

AWS secret key of the account.
OutputLocation



required
string

A valid S3 location to store the query results. Format: s3://bucketname/foldername

The following link explains the s3 output location in Athena and its usage.
Output location in the Athena
Database

required
string

database which needs to be connected
Schema

required for table mode
string

Enter a valid Schemaname, which will mostly be the database name.
AdvancedSettings

optional
string

Additional optional connection parameters can be provided. By default, it is empty.

Parameters for adding expressions when creating Data Source

Parameters Details
Name

required

string

Name of the Expression

Expression



required

string

Expression


Parameters for editing Data Source

NOTE: For editing a Data Source via API, all parameters are optional. The required parameter that needs to be changed can be provided.

Parameters for modifying expressions when editing Data Source

Parameters Details
Name

required

string

Name of the Expression

Expression



required

string

Expression


Action



optional

string

add/delete/edit

By default, it is add.

NewName

optional

string

For renaming the expression. This is applicable only if the Action is edit

Connection Sample for Table Mode

For creating connection:

"Connection":
{
"RegionEndpoint": "string",
"AwsAccessKeyId": "string",
"AwsSecretAccessKey": "string",
"OutputLocation": "string",
"Database": "string",
"Schemaname": "string",
"Tablename": "string",
"AdvancedSettings": "string",
"Expressions" : [{
"Name": "Expression1",
"Expression" : "SUM(numeric expression)"
    },
    {
"Name": "Expression2",
"Expression" :  "UPPER(string expression)"
}]
}

For creating connection with multiple tables :

"Connection":
{
"RegionEndpoint": "string",
"AwsAccessKeyId": "string",
"AwsSecretAccessKey": "string",
"OutputLocation": "string",
"Database": "string",
"Tables": [
            {
                "Tablename": "string",
                "Schemaname": "string"
            },
            {
                "Tablename": "string",
                "Schemaname": "string"
            }
        ],
"JoinInfo": [
            {
                "JoinType": "string",
                "LeftTable": "string",
                "RightTable": "string",
                "JoinFieldInfos": [
                    {
                        "Condition": "string",
                        "LeftField": "string",
                        "Operator": "string",
                        "RightField": "string",
                        "Value": "string"
                    },
                    {
                        "Condition": "string",
                        "LeftField": "string",
                        "Operator": "string",
                        "RightField": "string",
                        "Value": "string"
                    }
                ]
            }
        ],
"AdvancedSettings": "string",
"Expressions" : [{
"Name": "Expression1",
"Expression" : "SUM(numeric expression)"
    },
    {
"Name": "Expression2",
"Expression" :  "UPPER(string expression)"
}]
}

For editing connection:

"Connection":
{
"RegionEndpoint": "string",
"AwsAccessKeyId": "string",
"AwsSecretAccessKey": "string",
"OutputLocation": "string",
"Database": "string",
"Schemaname": "string",
"Tablename": "string",
"AdvancedSettings": "string",
"Expressions" : [{
"Name": "Expression1",
"Expression" : "SUM(numeric expression)",
"NewName" : "Sum",
"Action": "edit"
    },
    {
"Name": "Expression2",
"Expression" :  "UPPER(string expression)"
"Action": "delete"
}]
}

NOTE: Through the REST API, the data source can be created or edited with only one table. If a different table is provided in editing the data source, the table will be replaced. The widgets will be retained only if the schema is the same as the previous table.

Connection Sample for Code View Mode

"Connection":
{
"RegionEndpoint": "string",
"AwsAccessKeyId": "string",
"AwsSecretAccessKey": "string",
"OutputLocation": "string",
"Database": "string",
"Query": "string",
"AdvancedSettings": "string",
"Expressions" : [{
"Name": "Expression1",
"Expression" : "SUM(numeric expression)"
    },
    {
"Name": "Expression2",
"Expression" :  "UPPER(string expression)"
}]
}

Sample connection for editing the connection while uploading the dashboard via API.

"Connection":  {   
       "Database": "string",
       "RegionEndpoint": "string",
       "OutputLocation": "string",
       "AwsAccessKeyId": "string",
       "AwsSecretAccessKey": "string",
       "Schema": "string"
  } 

Data Transformation

Editing a data connection

Dashboard designer walk-through