ffc-pay-etl-framework 1.4.2-alpha.6 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.npmignore +26 -0
  2. package/app/database-connections/index.js +7 -0
  3. package/app/database-connections/postgres-database-connection.js +47 -0
  4. package/app/database-connections/provided-connection.js +19 -0
  5. package/app/destinations/README.md +107 -0
  6. package/app/destinations/console-destination.js +38 -0
  7. package/app/destinations/csv-file-destination.js +94 -0
  8. package/app/destinations/index.js +12 -0
  9. package/app/destinations/postgres-destination.js +141 -0
  10. package/app/destinations/sql-file-destination.js +68 -0
  11. package/app/lib/index.js +103 -0
  12. package/app/lib/row-meta-data.js +24 -0
  13. package/app/loaders/csv-loader.js +58 -0
  14. package/app/loaders/index.js +5 -0
  15. package/app/misc/README.md +55 -0
  16. package/app/misc/index.js +5 -0
  17. package/app/misc/postgres-sql-task.js +65 -0
  18. package/app/transformers/README.md +102 -0
  19. package/app/transformers/faker-transformer.js +48 -0
  20. package/app/transformers/index.js +9 -0
  21. package/app/transformers/string-replace-transformer.js +38 -0
  22. package/app/transformers/to-upper-case-transformer.js +29 -0
  23. package/app/validators/README.md +81 -0
  24. package/app/validators/index.js +9 -0
  25. package/app/validators/multi-tool-validator.js +50 -0
  26. package/app/validators/required-validator.js +35 -0
  27. package/app/validators/unique-validator.js +46 -0
  28. package/azure-pipelines.yml +45 -0
  29. package/examples/additional-tasks.js +127 -0
  30. package/examples/csv-faker.js +30 -0
  31. package/examples/csv-find-replace.js +97 -0
  32. package/examples/csv-multi-tool-validator.js +38 -0
  33. package/examples/csv-required-validator.js +27 -0
  34. package/examples/csv-to-csv.js +24 -0
  35. package/examples/csv-to-postgres.js +36 -0
  36. package/examples/csv-to-sqlfile.js +31 -0
  37. package/examples/csv-to-upper-case.js +25 -0
  38. package/examples/csv-unique-validator.js +27 -0
  39. package/examples/index.js +26 -0
  40. package/examples/sql-return-values.js +37 -0
  41. package/index.js +3 -1
  42. package/jest.config.js +42 -0
  43. package/jest.setup.js +2 -0
  44. package/package-lock.json +7992 -0
  45. package/package.json +22 -66
package/.npmignore ADDED
@@ -0,0 +1,26 @@
1
+ # Ignore dotfiles explicitly by name
2
+ /.all-contributorsrc
3
+ /.dockerignore
4
+ /.gitignore
5
+ /.snyk
6
+ /CODE_OF_CONDUCT.md
7
+ /CONTRIBUTING.md
8
+ /eslint.config.js
9
+ /ISSUE_TEMPLATE.md
10
+ /Jenkinsfile
11
+ /LICENSE.md
12
+ /PULL_REQUEST_TEMPLATE.md
13
+ /sonar-project.properties
14
+ /snyk_report.html
15
+ /snyk-error.log
16
+ /snyk-monitor-result.json
17
+ /snyk-result.json
18
+
19
+ # Ignore folders recursively
20
+ __mocks__/
21
+ .devcontainer/
22
+ .github/
23
+ jest/
24
+ test/
25
+ snyk-cli/
26
+ test-output/
@@ -0,0 +1,7 @@
1
+ const { PostgresDatabaseConnection } = require('./postgres-database-connection')
2
+ const { ProvidedConnection } = require('./provided-connection')
3
+
4
+ module.exports = {
5
+ PostgresDatabaseConnection,
6
+ ProvidedConnection
7
+ }
@@ -0,0 +1,47 @@
1
+ const DEFAULT_PORT = 5432
2
+ const { Sequelize } = require('sequelize')
3
+ const debug = require('debug')('connection')
4
+
5
+ /**
6
+ *
7
+ * @param {Object} options
8
+ * @param {Object} options.connectionname
9
+ * @param {Object} options.username
10
+ * @param {Object} options.password
11
+ * @param {Object} options.database
12
+ * @param {Object} options.host
13
+ * @param {Object} options.port
14
+ * @returns Connection
15
+ */
16
+ async function postgresDatabaseConnection (options) {
17
+ const connectionname = options.connectionname
18
+ const username = options.username
19
+ const password = options.password
20
+ const database = options.database
21
+ const host = options.host
22
+ const port = options.port || DEFAULT_PORT
23
+
24
+ const sequelize = new Sequelize(database, username, password, {
25
+ host,
26
+ port,
27
+ dialect: 'postgres',
28
+ logging: false
29
+ })
30
+
31
+ try {
32
+ await sequelize.authenticate()
33
+ debug('sequelize.authenticate succeeded')
34
+ return {
35
+ name: connectionname,
36
+ db: sequelize
37
+ }
38
+ } catch (e) {
39
+ debug('sequelize.authenticate failed')
40
+ debug(e)
41
+ throw e
42
+ }
43
+ }
44
+
45
+ module.exports = {
46
+ PostgresDatabaseConnection: postgresDatabaseConnection
47
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ *
3
+ * @param {Object} options
4
+ * @param {Object} options.connectionname
5
+ * @param {Object} options.sequelize
6
+ * @returns Connection
7
+ */
8
+ async function providedConnection (options) {
9
+ const connectionname = options.connectionname
10
+ const sequelize = options.sequelize
11
+ return {
12
+ name: connectionname,
13
+ db: sequelize
14
+ }
15
+ }
16
+
17
+ module.exports = {
18
+ ProvidedConnection: providedConnection
19
+ }
@@ -0,0 +1,107 @@
1
+ # Destinations
2
+
3
+ Destinations are expected to write out to an output. This could be a file, a database, an endpoint, whatever.
4
+
5
+ Currently supported destinations are :
6
+
7
+ - CSVFileDestination
8
+ - PostgresDestination
9
+ - SQLFileDestination
10
+
11
+ ## CSVFileDestination
12
+
13
+ ### Options
14
+
15
+ | option | description |
16
+ | -------------- | ------------------------------------------------------------- |
17
+ | fileName | absolute path to the csv file to be written |
18
+ | headers | treat the first line of the file as column header information |
19
+ | includeErrors | write out any rows that contain errors |
20
+ | quotationMarks | wrap values in quotation marks |
21
+
22
+ ### Usage
23
+
24
+ ```js
25
+ CSVFileDestination({
26
+ fileName: "...",
27
+ headers: true,
28
+ includeErrors: false,
29
+ quotationMarks: true,
30
+ })
31
+ ```
32
+
33
+ ### Example
34
+
35
+ examples/csv-to-csv.js
36
+
37
+ ## PostgresDestination
38
+
39
+ ### Options
40
+
41
+ | option | description |
42
+ | ------------- | ------------------------------------------------------ |
43
+ | table | the name of the table to be inserted into |
44
+ | username | the username for the database connection |
45
+ | password | the password for the database connection |
46
+ | database | the name of the database for the connection |
47
+ | host | the host name for the database connection |
48
+ | port | the port for the database connection. Defaults to 5432 |
49
+ | includeErrors | write out any rows that contain errors |
50
+ | mapping | field mappings from source to target |
51
+
52
+ ### Usage
53
+
54
+ ```js
55
+ PostgresDestination({
56
+ username: "postgres",
57
+ password: "ppp",
58
+ database: "etl_db",
59
+ host: "postgres",
60
+ table: "target",
61
+ includeErrors: false,
62
+ mapping: [
63
+ {
64
+ column: "column1",
65
+ targetColumn: "target_column1",
66
+ targetType: "varchar",
67
+ },
68
+ ],
69
+ })
70
+ ```
71
+
72
+ ### Example
73
+
74
+ examples/csv-to-postgres.js
75
+
76
+ ## SQLFileDestination
77
+
78
+ ### options
79
+
80
+ | option | description |
81
+ | -------- | ------------------------------------------- |
82
+ | fileName | absolute path to the sql file to be written |
83
+ | mode | insert or update mode |
84
+ | table | the table for the statements |
85
+ | mapping | field mappings from source to target |
86
+
87
+ ### Usage
88
+
89
+ ```js
90
+ SQLFileDestination({
91
+ filename: "...",
92
+ mode: SQL_MODE.INSERT_MODE,
93
+ table: "target",
94
+ includeErrors: false,
95
+ mapping: [
96
+ {
97
+ column: "column1",
98
+ targetColumn: "target_column1",
99
+ targetType: "varchar",
100
+ },
101
+ ],
102
+ })
103
+ ```
104
+
105
+ ### Example
106
+
107
+ examples/csv-to-sqlfile.js
@@ -0,0 +1,38 @@
1
+ const { Writable } = require('node:stream')
2
+
3
+ /**
4
+ *
5
+ * @param {Object} options
6
+ * @param {String} options.includeErrors
7
+ * @returns Writable
8
+ */
9
+ function consoleDestination (options) {
10
+ const includeErrors = options.includeErrors
11
+ const writable = new Writable({
12
+ objectMode: true,
13
+ write (chunk, _, callback) {
14
+ if (chunk.errors.length === 0 || includeErrors) { console.log(chunk) }
15
+ // @ts-ignore
16
+ this.tasks?.forEach(task => task.write(chunk))
17
+ callback()
18
+ }
19
+ })
20
+
21
+ Object.assign(writable, {
22
+ setConnection: function (connection) {
23
+ this.connection = connection
24
+ }.bind(writable),
25
+ getConnectionName: function () {
26
+ return this.connection?.name
27
+ }.bind(writable),
28
+ setTasks: function (tasks) {
29
+ this.tasks = tasks
30
+ }.bind(writable)
31
+ })
32
+
33
+ return writable
34
+ }
35
+
36
+ module.exports = {
37
+ ConsoleDestination: consoleDestination
38
+ }
@@ -0,0 +1,94 @@
1
+ const EventEmitter = require('node:events')
2
+ const util = require('node:util')
3
+ const { Writable } = require('node:stream')
4
+ const fs = require('node:fs')
5
+
6
+ /**
7
+ *
8
+ * @param {Object} options
9
+ * @param {String} options.fileName
10
+ * @param {Boolean} options.headers
11
+ * @param {Boolean} options.includeErrors
12
+ * @param {Boolean} options.quotationMarks
13
+ * @returns Writable
14
+ */
15
+ function csvFileDestination (options) {
16
+ EventEmitter.call(this)
17
+ let lastChunk
18
+ const fileName = options.fileName
19
+ const headers = options.headers
20
+ const includeErrors = options.includeErrors
21
+ const quotationMarks = options.quotationMarks
22
+
23
+ let fileHandle
24
+ try {
25
+ fileHandle = fs.openSync(fileName, 'w+')
26
+ } catch (error) {
27
+ throw new Error(`Failed to open file ${fileName}: ${error.message}`)
28
+ }
29
+
30
+ let headersWritten = false
31
+
32
+ const writable = new Writable({
33
+ objectMode: true,
34
+ write (chunk, _, callback) {
35
+ try {
36
+ if (!headersWritten && headers) {
37
+ if (quotationMarks) {
38
+ const quotedColumns = chunk._columns.map(c => `"${c}"`).join(',')
39
+ fs.writeSync(fileHandle, quotedColumns + '\n')
40
+ } else {
41
+ fs.writeSync(fileHandle, `${chunk._columns.join(',')}\n`)
42
+ }
43
+ headersWritten = true
44
+ }
45
+
46
+ const errors = Array.isArray(chunk.errors) ? chunk.errors : []
47
+
48
+ if (errors.length === 0 || includeErrors) {
49
+ const line = chunk.map(c => `"${c}"`).join(',') + '\n'
50
+ fs.writeSync(fileHandle, line)
51
+ }
52
+
53
+ if (this.tasks && Array.isArray(this.tasks)) {
54
+ this.tasks.forEach(task => task.write(chunk))
55
+ }
56
+
57
+ lastChunk = chunk
58
+ callback()
59
+ } catch (err) {
60
+ callback(err)
61
+ }
62
+ },
63
+ final (callback) {
64
+ if (fileHandle) {
65
+ fs.closeSync(fileHandle)
66
+ }
67
+
68
+ this.emit('result', lastChunk)
69
+ callback()
70
+ }
71
+ })
72
+
73
+ Object.assign(writable, {
74
+ setConnection: function (connection) {
75
+ this.connection = connection
76
+ }.bind(writable),
77
+
78
+ getConnectionName: function () {
79
+ return this.connection?.name
80
+ }.bind(writable),
81
+
82
+ setTasks: function (tasks) {
83
+ this.tasks = tasks
84
+ }.bind(writable)
85
+ })
86
+
87
+ return writable
88
+ }
89
+
90
+ util.inherits(csvFileDestination, EventEmitter)
91
+
92
+ module.exports = {
93
+ CSVFileDestination: csvFileDestination
94
+ }
@@ -0,0 +1,12 @@
1
+ const { ConsoleDestination } = require('./console-destination')
2
+ const { SQLFileDestination, SQL_MODE } = require('./sql-file-destination')
3
+ const { CSVFileDestination } = require('./csv-file-destination')
4
+ const { PostgresDestination } = require('./postgres-destination')
5
+
6
+ module.exports = {
7
+ ConsoleDestination,
8
+ SQLFileDestination,
9
+ SQL_MODE,
10
+ CSVFileDestination,
11
+ PostgresDestination
12
+ }
@@ -0,0 +1,141 @@
1
+ const EventEmitter = require('node:events')
2
+ const { Transform } = require('node:stream')
3
+ const debug = require('debug')('destination')
4
+
5
+ function isKeyWord (column) {
6
+ return ['USER'].includes(column.toUpperCase())
7
+ }
8
+
9
+ function getMappingForColumn (mapping, column) {
10
+ if (mapping.length === 0) {
11
+ return {}
12
+ }
13
+ const map = mapping.find(m => m.column === column)
14
+ return map || {}
15
+ }
16
+
17
+ function hasReturningColumns (mapping) {
18
+ return mapping.some(m => m.returning === true)
19
+ }
20
+
21
+ function getReturningColumns (mapping) {
22
+ return mapping.filter(m => m.returning === true).map(m => m?.targetColumn)
23
+ }
24
+
25
+ function writeInsertStatement (columnMapping, table, chunk, schema, ignoredColumns = []) {
26
+ const filteredColumns = chunk._columns.filter(column => {
27
+ const mapping = getMappingForColumn(columnMapping, column)
28
+ const targetColumn = mapping?.targetColumn ? mapping?.targetColumn : mapping?.column
29
+ return !ignoredColumns.includes(targetColumn)
30
+ })
31
+ let statement = `INSERT INTO ${schema ?? 'public'}."${table}" (${filteredColumns.map(column => {
32
+ const mapping = getMappingForColumn(columnMapping, column)
33
+ return mapping?.targetColumn ? `"${mapping.targetColumn}"` : `"${mapping?.column}"`
34
+ })
35
+ .join(',')}) VALUES (${filteredColumns.map(column => {
36
+ const index = chunk._columns.indexOf(column)
37
+ const mapping = getMappingForColumn(columnMapping, column)
38
+ if (mapping?.targetType === 'number' && (Number.isNaN(Number(chunk[index])) || chunk[index] === '')) {
39
+ debug('Source data is not a number.')
40
+ return 0
41
+ }
42
+ if (mapping?.targetType === 'varchar' || mapping?.targetType === 'char') {
43
+ return `'${chunk[index]}'`
44
+ }
45
+ if (mapping?.targetType === 'date') {
46
+ if (!chunk[index]) {
47
+ return '\'\''
48
+ }
49
+ return `to_timestamp('${chunk[index]}','${mapping?.format}')`
50
+ }
51
+ return chunk[index] ? chunk[index] : 'null'
52
+ })})`
53
+ if (hasReturningColumns(columnMapping)) {
54
+ statement = statement + ` RETURNING ${getReturningColumns(columnMapping).join(',')}`
55
+ }
56
+ return statement
57
+ }
58
+
59
+ /**
60
+ *
61
+ * @param {Object} options
62
+ * @param {Object} options.table
63
+ * @param {Object} options.connectionname
64
+ * @param {Object} options.mapping
65
+ * @param {Object} options.includeErrors
66
+ * @param {String} [options.schema]
67
+ * @param {Array<String>} [options.ignoredColumns]
68
+ * @returns Transform
69
+ */
70
+ function postgresDestination (options) {
71
+ EventEmitter.call(this)
72
+ const table = options.table
73
+ const connectionname = options.connectionname
74
+ const mapping = options.mapping
75
+ const schema = options.schema
76
+ const ignoredColumns = options.ignoredColumns ?? []
77
+ let lastChunk
78
+
79
+ const transform = new Transform({
80
+ objectMode: true,
81
+ emitClose: true,
82
+ construct (callback) {
83
+ // @ts-ignore
84
+ this.connectionname = connectionname
85
+ callback()
86
+ },
87
+ write (chunk, _, callback) {
88
+ let insertStatement
89
+ // @ts-ignore
90
+ if (chunk.errors.length === 0 || options.includeErrors) {
91
+ insertStatement = writeInsertStatement(mapping, table, chunk, schema, ignoredColumns)
92
+ debug('Insert statement: [%s]', insertStatement)
93
+ // @ts-ignore
94
+ this.connection.db.query(insertStatement)
95
+ .then(result => {
96
+ debug('result %o', result)
97
+ chunk._result = result
98
+ lastChunk = chunk
99
+ // @ts-ignore
100
+ this.tasks?.forEach(task => task.write(chunk))
101
+ // @ts-ignore
102
+ callback(null, chunk)
103
+ }).catch(error => {
104
+ debug('error %o', error)
105
+ chunk.errors.push(error)
106
+ lastChunk = chunk
107
+ // @ts-ignore
108
+ callback(error, chunk)
109
+ })
110
+ } else {
111
+ debug('Chunk has errors %o', chunk)
112
+ }
113
+ },
114
+ final (callback) {
115
+ this.emit('result', lastChunk)
116
+ callback()
117
+ }
118
+ })
119
+ Object.assign(Transform.prototype, {
120
+ type: 'PostgresDestination',
121
+ setConnection: function (connection) {
122
+ this.connection = connection
123
+ }.bind(transform),
124
+ getConnectionName: function () {
125
+ return this.connection?.name
126
+ }.bind(transform),
127
+ setTasks: function (tasks) {
128
+ this.tasks = tasks
129
+ }.bind(transform)
130
+ })
131
+ return transform
132
+ }
133
+
134
+ module.exports = {
135
+ PostgresDestination: postgresDestination,
136
+ writeInsertStatement,
137
+ isKeyWord,
138
+ getMappingForColumn,
139
+ hasReturningColumns,
140
+ getReturningColumns
141
+ }
@@ -0,0 +1,68 @@
1
+ const { Writable } = require('node:stream')
2
+ const fs = require('node:fs')
3
+
4
+ /**
5
+ * @enum {number}
6
+ */
7
+ const SQL_MODE = {
8
+ INSERT_MODE: 1,
9
+ UPDATE_MODE: 2
10
+ }
11
+
12
+ /**
13
+ *
14
+ * @param {Object} options
15
+ * @param {String} options.fileName
16
+ * @param {SQL_MODE} options.mode
17
+ * @param {String} options.table
18
+ * @param {Array} options.mapping
19
+ * @param {Boolean} options.includeErrors
20
+ * @returns Transform
21
+ */
22
+ function sqlFileDestination (options) {
23
+ const fileName = options.fileName
24
+ const sqlMode = options.mode
25
+ const table = options.table
26
+ const mapping = options.mapping
27
+
28
+ function writeInsertStatement (chunk) {
29
+ const statement = `INSERT INTO ${table} (${mapping.map(m => m.targetColumn)
30
+ .join(',')}) VALUES (${mapping.map((m) => {
31
+ const srcColumnIndex = chunk._columns.indexOf(m.column)
32
+ if (m.targetType === 'string') { return `'${chunk[srcColumnIndex]}'` }
33
+ return chunk[srcColumnIndex]
34
+ })});\n`
35
+ fs.writeFileSync(fileName, statement, {
36
+ encoding: 'utf8',
37
+ flag: 'a+'
38
+ })
39
+ }
40
+ const writable = new Writable({
41
+ objectMode: true,
42
+ write (chunk, _, callback) {
43
+ if (chunk.errors.length === 0 && sqlMode === SQL_MODE.INSERT_MODE) {
44
+ writeInsertStatement(chunk)
45
+ }
46
+ callback()
47
+ }
48
+ })
49
+
50
+ Object.assign(writable, {
51
+ setConnection: function (connection) {
52
+ this.connection = connection
53
+ }.bind(writable),
54
+ getConnectionName: function () {
55
+ return this.connection?.name
56
+ }.bind(writable),
57
+ setTasks: function (tasks) {
58
+ this.tasks = tasks
59
+ }.bind(writable)
60
+ })
61
+
62
+ return writable
63
+ }
64
+
65
+ module.exports = {
66
+ SQLFileDestination: sqlFileDestination,
67
+ SQL_MODE
68
+ }
@@ -0,0 +1,103 @@
1
+ const EventEmitter = require('node:events')
2
+ const { RowMetaData } = require('./row-meta-data')
3
+ const { compose } = require('node:stream')
4
+
5
+ /**
6
+ * @typedef {Object} Etl
7
+ * @function loader
8
+ * @function pump
9
+ * @function connection
10
+ * @function validator
11
+ * @function destination
12
+ * @function transform
13
+ */
14
+
15
+ /**
16
+ *
17
+ * @returns Etl
18
+ */
19
+ class Etl extends EventEmitter {
20
+ constructor () {
21
+ super()
22
+ this.store = []
23
+ this.beforeETLList = []
24
+ this.connectionList = []
25
+ this.validatorList = []
26
+ this.transformationList = []
27
+ this.destinationList = []
28
+ }
29
+
30
+ loader (loader) {
31
+ this.loader = loader
32
+ return this
33
+ }
34
+
35
+ pump () {
36
+ this.beforeETLList.forEach(task => {
37
+ task.write({})
38
+ })
39
+
40
+ this.loader
41
+ .pump(this.loader)
42
+ .pipe(
43
+ compose(
44
+ RowMetaData(),
45
+ ...this.validatorList,
46
+ ...this.transformationList,
47
+ ...this.destinationList.map(dl => dl.on('result', data => this.emit('result', data)))
48
+ )
49
+ )
50
+ .on('error', err => this.emit('error', err))
51
+ return this
52
+ }
53
+
54
+ beforeETL (pipelineTask) {
55
+ const connectionname = pipelineTask.getConnectionName()
56
+ const connection = this.connectionList.find(c => c.name === connectionname)
57
+ if (!connection) {
58
+ throw new Error(`Connection with name ${connectionname} not found`)
59
+ }
60
+ pipelineTask.setConnection(connection)
61
+ pipelineTask.setETL(this)
62
+ this.beforeETLList.push(pipelineTask)
63
+ return this
64
+ }
65
+
66
+ connection (connection) {
67
+ this.connectionList.push(connection)
68
+ return this
69
+ }
70
+
71
+ validator (validator) {
72
+ this.validatorList.push(validator)
73
+ return this
74
+ }
75
+
76
+ destination (destination, ...tasks) {
77
+ const connectionname = destination.getConnectionName()
78
+ const connection = this.connectionList.find(c => c.name === connectionname)
79
+ if (!connection && destination.type === 'PostgresDestination') {
80
+ throw new Error(`No connection could be found with name ${connectionname}`)
81
+ } else {
82
+ destination.setConnection(connection)
83
+ }
84
+
85
+ if (tasks && tasks.length > 0) {
86
+ for (const task of tasks) {
87
+ task.setETL(this)
88
+ }
89
+ destination.setTasks(tasks)
90
+ }
91
+ this.destinationList.push(destination)
92
+ return this
93
+ }
94
+
95
+ transform (transform) {
96
+ this.transformationList.push(transform)
97
+ return this
98
+ }
99
+ }
100
+
101
+ module.exports = {
102
+ Etl
103
+ }
@@ -0,0 +1,24 @@
1
+ // @ts-nocheck
2
+ const { Transform } = require('node:stream')
3
+
4
+ function rowMetaData () {
5
+ return new Transform({
6
+ readableObjectMode: true,
7
+ writableObjectMode: true,
8
+ decodeStrings: false,
9
+ construct (callback) {
10
+ this.rowId = 0
11
+ callback()
12
+ },
13
+ transform (chunk, _, callback) {
14
+ chunk['_rowId'] = this.rowId
15
+ chunk['errors'] = []
16
+ this.rowId += 1
17
+ callback(null, chunk)
18
+ }
19
+ })
20
+ }
21
+
22
+ module.exports = {
23
+ RowMetaData: rowMetaData
24
+ }