How do I populate a custom field with a column from a database?

How do I populate a custom field with a column from a database?

I have connections to Jira and the database but can't seem to find the documentation on how to do this. Any help is much appreciated!