ffc-pay-etl-framework 1.1.0 → 1.1.1-alpha.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4
4
 
5
- [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
5
+ [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
6
6
 
7
7
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
8
8
 
@@ -98,8 +98,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
98
98
  <tbody>
99
99
  <tr>
100
100
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/suityou01"><img src="https://avatars.githubusercontent.com/u/7422644?v=4?s=100" width="100px;" alt="Charlie Benger-Stevenson"/><br /><sub><b>Charlie Benger-Stevenson</b></sub></a><br /><a href="https://github.com/DEFRA/ffc-pay-etl-framework/commits?author=suityou01" title="Code">💻</a></td>
101
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/GodsonLeigh"><img src="https://avatars.githubusercontent.com/u/139965284?v=4?s=100" width="100px;" alt="GodsonLeigh"/><br /><sub><b>GodsonLeigh</b></sub></a><br /><a href="https://github.com/DEFRA/ffc-pay-etl-framework/commits?author=GodsonLeigh" title="Code">💻</a></td>
102
- </tr>
101
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/GodsonLeigh"><img src="https://avatars.githubusercontent.com/u/139965284?v=4?s=100" width="100px;" alt="Leigh Godson"/><br /><sub><b>Leigh Godson</b></sub></a><br /><a href="https://github.com/DEFRA/ffc-pay-etl-framework/commits?author=GodsonLeigh" title="Code">💻</a></td>
102
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/samplackett"><img src="https://avatars.githubusercontent.com/u/60177449?v=4?s=100" width="100px;" alt="Sam Plackett"/><br /><sub><b>Leigh Godson</b></sub></a><br /><a href="https://github.com/DEFRA/ffc-pay-etl-framework/commits?author=samplackett" title="Code">💻</a></td> </tr>
103
103
  </tbody>
104
104
  <tfoot>
105
105
  <tr>
@@ -40,7 +40,10 @@ function writeInsertStatement(columnMapping, table, chunk) {
40
40
  return `'${chunk[index]}'`;
41
41
  }
42
42
  if ((mapping === null || mapping === void 0 ? void 0 : mapping.targetType) === "date") {
43
- return `to_date('${chunk[index]}','${mapping === null || mapping === void 0 ? void 0 : mapping.format}')`;
43
+ if (!chunk[index]) {
44
+ return `''`;
45
+ }
46
+ return `to_timestamp('${chunk[index]}','${mapping === null || mapping === void 0 ? void 0 : mapping.format}')`;
44
47
  }
45
48
  return chunk[index] ? chunk[index] : 'null';
46
49
  })})`;
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAuDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAtGD,yFA8BC;AAhDD,gDAEC;AAED,oEAIC;AAED,2DAEC;AAED,uDAEC"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AA0DA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAzGD,yFAiCC;AAnDD,gDAEC;AAED,oEAIC;AAED,2DAEC;AAED,uDAEC"}
@@ -42,7 +42,10 @@ function writeInsertStatement(columnMapping, table, chunk) {
42
42
  return `'${chunk[index]}'`;
43
43
  }
44
44
  if (mapping?.targetType === "date") {
45
- return `to_date('${chunk[index]}','${mapping?.format}')`;
45
+ if (!chunk[index]) {
46
+ return `''`;
47
+ }
48
+ return `to_timestamp('${chunk[index]}','${mapping?.format}')`;
46
49
  }
47
50
  return chunk[index] ? chunk[index] : 'null';
48
51
  })})`;
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAuDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAtGD,yFA8BC;AAhDD,gDAEC;AAED,oEAIC;AAED,2DAEC;AAED,uDAEC"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AA0DA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAzGD,yFAiCC;AAnDD,gDAEC;AAED,oEAIC;AAED,2DAEC;AAED,uDAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ffc-pay-etl-framework",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-alpha.2",
4
4
  "publisher": "Defra",
5
5
  "main": "dist/cjs/index.js",
6
6
  "private": false,