# Fliplet API authorisation token taken from Fliplet Studio. More documentation available at: # https://developers.fliplet.com/REST-API/authenticate.html#how-to-create-an-authentication-token auth_token: eu--123456789 # Define the ID of the target Fliplet Data Source where data will be pushed to. # This ID can be retrieved from the "Manage app data" section of Fliplet Studio # under the settings tab. Don't forget to give access to this data source to your token. # More documentation is available at: # https://developers.fliplet.com/REST-API/fliplet-datasources.html#access-roles datasource_id: 123 # Database connection settings below # Possible values for the driver are: mysql, sqlite, postgres, mssql database_driver: mssql database_host: localhost database_username: sampleuser database_password: 123456 database_port: 5432 database_name: eu # MSSQL Server only: uncomment if you need to use these variables. # database_domain: sampleDomainName # database_instance: sampleInstanceName # database_encrypt: true # ODBC Native driver only: uncomment this and install the driver on your computer # by pasting this command to the terminal: "npm install sequelize-odbc-mssql -g" # database_native_odbc: true # Description of the operation (will be printed out in the logs). description: Push my users to Fliplet every 15 minutes # If set to true, the sync will also run when the script starts. # Otherwise, it will only run according to the frequency setting above. sync_on_init: true # Frequency of running using unix cronjob syntax. # Syntax is [Minute] [Hour] [Day of month] [Month of year] [Day of week] # You can find many examples here https://crontab.guru/examples.html # When testing, if you have init sync enabled your agent will sync as soon as it is run # so restarting the agent is the fastest way to test if the configuration is working. # A few examples here below. Feel free to uncomment the line you need: # frequency: '0 */2 * * *' # every 2 hours # frequency: '0 8 * * *' # every day at 8am # frequency: '0 0 * * 0' # every week frequency: '*/15 * * * *' # every 15 minutes # The query to run to fetch the data to be pushed to Fliplet. # The column names must match the data source or new columns will be added, # use SQL "AS" to map database columns to Fliplet data source column names # and avoid new columns from being created. query: SELECT id, email as 'Email', fullName as 'Full Name', updatedAt FROM users; # Define which column should be used as primary key # to understand whether a record already exists on the Fliplet Data Source. # If you don't define this, every time the script runs rows will be appended # to the Fliplet Data Source without running a comparison on whether the row # has already been added. primary_column: id # Choose whether the primary column should be considered case-sensitive or not. case_insensitive_primary_column: true # Define which (optional) column should be used to compare whether # the record has been updated on your database since it got inserted # to the Fliplet Data Source hence might require updating timestamp_column: updatedAt # Define whether remote entries on Fliplet servers should be kept or deleted when # they are not found in the local dataset returned by the query result. # Using "update" will keep orphaned entries while "replace" will delete them. mode: update # Define the batch size in which records will be processed. If value not provided default will be 1000 # If mode is set to replace, records will be processed in batch # else all the records processed at once batch_size: 1000 # Define which (optional) column should be used to compare whether # the record has been flagged as deleted on your database and should # be removed from the Fliplet Data Source when the column value is not null. # Uncomment the following line to enable the feature. # delete_column: deletedAt # Define which (optional) post-sync hooks should run on the data source data when received # by Fliplet servers. Hook types are "insert" and "update" run_hooks: # - "insert" # - "update" # Define whether updating entries will merge local columns with remote columns. # This is useful if your data is updated by Fliplet Apps. merge: true # Define what columns in your local database rows are URLs to remote or local files # to be sync to Fliplet servers when inserting or updating rows. files: # Define a column containing a remote URL to a file, e.g. "https://example.org/John.jpg" # - column: thumbnail # type: remote # headers: # Authorization: Bearer 123 # Define a column containing a local absolute URL to a file, e.g. "/home/user/John.jpg" # - column: thumbnail # type: local # Define a column containing a relative URL to a file in the specified directory, e.g. "John.jpg" # - column: thumbnail # type: local # directory: /Users/John/Desktop # Define what columns should be encrypted to encrypt # encrypt: # fields: # - First Name # - Last Name # Define the log verbosity, between "debug", "info" and "critical". log_verbosity: debug