Skip to content

Commit

Permalink
Add test for valid new manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVyborny committed May 6, 2024
1 parent 835f5ba commit c53d04a
Showing 1 changed file with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function provideOptions(): array
'value' => 'A different value',
],
],
'column_metadata' => (object) [
'column_metadata' => (object)[
'123456' => [
[
'key' => 'int.column.name',
Expand All @@ -76,7 +76,7 @@ public function provideOptions(): array
(new ManifestOptions())
->setEnclosure('_')
->setDelimiter('|')
->setColumnMetadata((object) [
->setColumnMetadata((object)[
'123456' => [
[
'value' => 'Int column name',
Expand Down Expand Up @@ -105,6 +105,48 @@ public function provideOptions(): array
])
->setPrimaryKeyColumns(['id']),
],
'new native datatypes manifest' => [
[
'destination' => 'my.table',
'primary_key' => ['id'],
'delimiter' => '|',
'enclosure' => '_',
'manifest_type' => 'output',
'schema' => [
[
'name' => 'id',
'data_type' => [
'base' => ['type' => 'INTEGER', 'length' => '11', 'default' => '123'],
'bigquery' => ['type' => 'VARCHAR', 'length' => '255'],
],
'nullable' => false,
'primary_key' => true,
'metadata' => [
'KBC.description' => 'Primary key column',
],
],
],
'incremental' => true,
],
(new ManifestOptions())
->setEnclosure('_')
->setDelimiter('|')
->setManifestType('output')
->setSchema(new ManifestOptionsSchema(
'id',
[
'base' => ['type' => 'INTEGER', 'length' => '11', 'default' => '123'],
'bigquery' => ['type' => 'VARCHAR', 'length' => '255'],
],
false,
true,
null,
['KBC.description' => 'Primary key column']
))
->setDestination('my.table')
->setIncremental(true)
->setPrimaryKeyColumns(['id']),
],
];
}

Expand Down

0 comments on commit c53d04a

Please sign in to comment.