Skip to main contentQuickstart
You’ve just downloaded Popsink’s connector to IBMi DB2 from Snowflake’s Marketplace, and you’re now eager to run your
first replication. Then, you’ve come to right the place !
On first launch, the application will welcome you with a step-by-step configuration wizard that you can pause and resume any
time, your progress will be saved.
If you’re entirely new to
IBMi/AS400 and currently have no system to connect to, please head to this page, follow the instructions
and start experimenting with your new DB2 system.
If not, you’ve already got a DB2 system in place, and you want to replicate it, please continue.
1. Prerequisites
In this important step, the user goes through a check-list of actions that need to be taken before moving on to the next
steps. Not everything can be setup through the user interface, often for security reasons.
1.1 Enable Journaling
It’s a vital step to capture changes from the source databases with no additional overhead. Please head to journaling,
if you need help setting it up on your DB2 environment.
Take notes of the journaled tables you’d like to replicate.
1.2 Find an available name for the target database
Snowflake’s security prevents an app to list all the existing databases and schemas. That’s why your administrator needs to run
SHOW DATABASES to confirm that your choice of target database name is valid.
When you’re ready you can mark the prerequisites as ‘Completed’ and move to the next step.
2. Connector’s Configuration
On this page, you will configure a few simple but essential settings :
- Grant privileges to create the target database and run synchronization tasks.
- Define what warehouse to connect to. The running costs of the app will be billed to this warehouse.
- Define the target database name. You must choose an available name.
- Define the schema name storing the replicated tables.
When you’re finished, click on ‘Configure’.
3. Firewall & Credentials Configuration
Next step enables your connection to your source IBMi system. You will need 2 things :
- A network access to your hostname.
- A username & password to an account with rights to read the DB2 journal.
Snowflake has an embedded system of external access integration (EAI) that securely declares the port your
connection requires, as well as credential data (here a simple username/password pair, the only mean to connect to IBMi)
When you’ve entered all the fields, clicking on ‘Enable access’ will take you to the next step where you simply need
to refresh your page. During this restart, you’ll be asked to allow access to your source host, click on ‘Review’
, then ‘Next’. In the description page of app, please click on ‘Launch App’.
After this simple step your source data will become accessible.
4. DB2 Connection’s Configuration
Now your connection to DB2 is valid, it’s time to define the source data you want to replicate in this simple step :
- Choose a source schema.
- Enter a comma-separated list of journaled tables belonging to this schema.
These tables have to be assigned to the same DB2 journal.
Click on ‘Connect’ to move to the last step.
5. Finalize
To finish with, a few settings can be modified before starting the replication :
- In case a source table is really large, or you only want to capture changes, it’s possible to skip the initial snapshot with the following checkbox.
- By default, synchronization period is 20 seconds, meaning the changes will be read from DB2 every 20 seconds by a Snowflake’s scheduled task. It’s possible to change this setting according to your latency and power requirements. A larger period means higher latencies but less compute usage.
Click on ‘Finalize Configuration’ to start the replication.
Monitor the replication
Snowflake will now run 3 different tasks (or 2 if you’ve decided to skip the initial snapshot) :
AS400_CREATE_TARGET - creates the target tables in the target schema. replicated tables will be prefixed by POPSINK_.
AS400_SNAPSHOT - selects all the source data at startup time and fills the target tables.
AS400_SYNC - polls the DB2 journal to load all the changes since last synchronization and update target tables accordingly.
They can be viewed under the Task menu of Snowflake.