Prerequisites
Before starting this tutorial, ensure you have the following:- An existing AWS, Azure, or Google Cloud account
- Required roles:
nx1_ingestandsuperset_user. - While configuring variables to deploy NexusOne,
your
ranger_repo_modevariable has the valueshared. This ensures you have thenx1-unifiedsqlservice name. NexusOne supports other values too, but this tutorial usesshared. - A policy that your platform administrator creates for you. It should be on the
mysql_schemaschema in theicebergcatalog, and grant thealter,create,drop,insert,select, andupdatepermissions. It’s created with one of the following options:- NexusOne portal: Refer to Grant a role access to data.
- Ranger: Refer to Create a policy.
- When you create the policy, assign it to the
nx1_ingestorsuperset_userrole. - Command line tools from AWS, Azure, or Google Cloud installed
- mysql command line tool installed
- Terraform installed
Authenticate to your public cloud
Use your public cloud’s command line tool to authenticate to your cloud account. This allows Terraform to interact with your cloud account.- AWS
- Azure
- Google
The following AWS command requests that you enter the following AWS credentials:To create an access key ID and secret access key, refer to
How IAM users can manage their own access keys in the AWS documentation.
- Access key ID
- Secret access key
- Default region
Define a Terraform and cloud provider
After authenticating to your cloud account using the command line tool, create the following Terraform file.Define a MySQL instance
This step defines Terraform resources required in this tutorial for deploying the MySQL database. Create the following Terraform file.Deploy the MySQL instance
After defining the MySQL Terraform resource specific to your cloud provider, take the following steps to deploy the Terraform resources.-
Initialize the Terraform configuration.
-
Create the MySQL instance.
Add datasets to the database
To ingest datasets from the database into NexusOne, these datasets need to exist first. Take the following steps to add datasets to the database:-
Authenticate to the database using the mysql command line tool.
- AWS
- Azure
- Google
-
Create a schema.
-
Create a table inside the
tutorialschema. -
Insert data into the table.
-
View all rows in the
testtable.
Ingest the database into NexusOne
Now that a dataset is available on the MySQL database, you can ingest the database into NexusOne using the following steps:- Log in to NexusOne.
- On the top navigation bar, hover your mouse over Data, and then select Ingest.
- Click New pipeline.
- In the Source step, select Database.
-
Enter the connection details:
- Engine:
MySQL - Host:
<database_address>, or<database_public_ip>on Google Cloud - Port:
3306 - Database:
tutorial - Username:
mysqladmin - Password:
NexusMySQL!
- Port 3306 is MySQL’s default port number.
- In MySQL, a database name is also a schema name.
- Engine:
-
Click A table, and then enter
tutorial.testin the Table field. - Click Next.
- In the Preview and schema step, don’t add any column changes, click Next.
-
In the Destination step, enter the following information in the fields:
- Schema:
mysql_schema - Table:
mysql_table - Mode:
Append - Pipeline name:
ingest_database - Schedule:
Once
- Schema:
- Click Next.
- In the Governance step, don’t add any tags or domain, click Next.
- In the Review step, click Create pipeline.
Monitor the pipeline
When you create the pipeline, NexusOne creates an Airflow job and opens the Ingest page, which lists your pipelines in a table. Since you set the pipeline to run once, as soon as it’s created, you can monitor the run using the following steps:- On the Ingest page, click the All tab to show pipelines with any status.
- Select Mine to show only your pipelines.
- In the table, find your pipeline,
ingest_database, and click it. - On the pipeline’s page, click the Runs tab.
- Find the latest run in the list, and watch its status in the Result column.
- Wait for a few minutes and refresh your browser until the status in the Result column changes to
Succeeded.
Visualize your dataset
Use the following steps to visualize your dataset:- On the top navigation bar, hover your mouse over Platform, and then select Tools.
- On the Superset card, click SQL Lab to launch Superset’s SQL Lab.
-
Enter the following command in the query box:

Visualize your dataset
Delete the schema and Terraform resources
After completing the tutorial, delete the created schema and MySQL instance using the following steps:-
Delete the schema.
-
Destroy the Terraform resources.
Additional resources
- To get an overview of what database ingestion is, refer to Data ingestion overview.
- For general instructions about how to ingest a database in NexusOne, refer to Ingest a database.
- For more information about roles or permissions, refer to IAM.

