Frequently Asked Questions

1 - I created a list of fields to skip and included them in the configuration file using the skipColumns property but the fields are still being loaded in the database

Make sure you did not use TABS as you were listing the fields to be excluded. Use a text editor that has the capability to show non-printable characters and look for tabs and delete them. Per the YAML standard, configuration files cannot include TABS.

2 - My source file is comma-delimited but some records contain data that has commas. How can I configure SmartLoader to process such records and not reject them?

Use the quotes property in the configuration file to tell SmartLoader to enclose all Fields with double quotes.

3 - How can I debug my Groovy expressions?

We recommend you install a Groovy Console and test your Groovy expressions in the console prior to including them in the configuration file

4 - I have many CSV files with the same file structure but each has different name. do I have to create a configuration file for each?

No. You just need to one configuration file and point to it from a routing.cfg file. The rounting.cfg file should contain a regular expression that selects the source files in question. Refer to the Configurations section for a step-by-step instructions on how you can do that.

5 - What are regular expressions?

A regular expression (regex) is a sequence of characters that specifies a search pattern for selecting files. A lot of tutorials and examples are available online.

6 - I created an entry in routing.cfg that points to a config file but SmartLoader is throwing an error saying it could not find a config file

Make sure all entries in the routing.cfg file are lower case

7 - Does SmartLoader have online help?

Yes. Just execute **java -jar smartloader.jar -help

8 - How do I add fields to the database or change the types of existing fields?

Fields are managed via the configuration file(s). As you define new fields in the config file(s), they all automatically be added to the database. It is a good practice to generate SQL files using the -generateSqlFileOnly argument to review the new fields that they will inserted into the database.

9 - What environment variables SmartLoader reads?

SmartLoader can read any parameter from the environment, variables should be prefixed by SMARTLOADER_. For example, to set workDir as an environment variable you set it as SMARTLOADER_workDir. _FILE may be appended to environment variables, causing SmartLoader to load the values for those variables from files. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example: SMARTLOADER_dbPassword_FILE=/run/secrets/smartloader_password