The Presto catalog properties file references a data source and maintains the set of properties associated with that data source connector. You can have one or more catalogs per connector. The Presto connector can have multiple initiator catalogs, one for each link and version pair. The catalog properties file is analogous to the CREATE FOREIGN SERVER statement for the Teradata connector.
After manually editing the file, you must restart the Presto server for the new configuration to take effect.
Do the following to configure the Presto catalog properties file:
- Log on as an Administrator to the master node of the Hadoop cluster where Presto is installed.
Create and edit an initiator catalog properties file: ~/.prestoadmin/catalog/name.properties
For example, create and edit a file named tdh234m1sdld0461_active.properties. Add the following content to the file:
connector.name=qginitiator qginitiator.linkName=tdh234m1sdld0461 qginitiator.version=active
Run presto-admin catalog add name
to deploy the properties file on all nodes.
presto-admin catalog add tdh234m1sdld0461_active
Restart the Presto cluster.
presto-admin server restart
From Presto CLI use the SHOW CATALOGS command to verify the newly created properties file exists.
tdh234m1:~ # presto-cli --server localhost:8090 presto:testuser> show catalogs;Result:
Catalog ------------------------- hive qginitiator qgremote system tdh234m1sdld0461_active tpch