Skip to content

Commit

Permalink
Tests with custom queries now provides metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVyborny committed Jul 19, 2024
1 parent ceae926 commit 4c16c1f
Show file tree
Hide file tree
Showing 22 changed files with 982 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
"id","name"
"123","John"
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
{
"destination": "in.c-main.simple",
"incremental": false
"incremental": false,
"columns": [
"id",
"name"
],
"column_metadata": {
"id": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "INTEGER"
},
{
"key": "KBC.sourceName",
"value": "id"
},
{
"key": "KBC.sanitizedName",
"value": "id"
},
{
"key": "KBC.uniqueKey",
"value": false
}
],
"name": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "name"
},
{
"key": "KBC.sanitizedName",
"value": "name"
},
{
"key": "KBC.uniqueKey",
"value": false
}
]
}
}
3 changes: 3 additions & 0 deletions tests/functional/run-action-debug-logging/expected-stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Creating PDO connection to "mysql:host=mysql;port=3306;charset=utf8;dbname=test"
Exporting "sales" to "in.c-main.escaping".
[%s] DEBUG: Running query "SELECT * FROM escaping". [] []
[%s] DEBUG: Running query "SELECT 1". [] []
[%s] DEBUG: Running query "CREATE TEMPORARY TABLE temp_table AS SELECT * FROM escaping LIMIT 0;". [] []
[%s] DEBUG: Running query "SHOW COLUMNS FROM temp_table". [] []
[%s] DEBUG: Running query "DROP TEMPORARY TABLE temp_table". [] []
Exported "7" rows to "in.c-main.escaping".
Exporting "sales" to "in.c-main.sales".
[%s] DEBUG: Running query "SELECT * FROM `test`.`sales`". [] []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"col1","col2"
"line with enclosure","second column"
"column with enclosure """", and comma inside text","second column enclosure in text """""
"columns with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
{
"destination": "in.c-main.escaping",
"incremental": false
"incremental": false,
"columns": [
"col1",
"col2"
],
"column_metadata": {
"col1": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col1"
},
{
"key": "KBC.sanitizedName",
"value": "col1"
},
{
"key": "KBC.uniqueKey",
"value": false
}
],
"col2": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col2"
},
{
"key": "KBC.sanitizedName",
"value": "col2"
},
{
"key": "KBC.uniqueKey",
"value": false
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"emoji"
"😁"
"😂"
"😃"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
{
"destination": "in.c-main.emoji",
"incremental": false
"incremental": false,
"columns": [
"emoji"
],
"column_metadata": {
"emoji": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "emoji"
},
{
"key": "KBC.sanitizedName",
"value": "emoji"
},
{
"key": "KBC.uniqueKey",
"value": false
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"col1","col2"
"line with enclosure","second column"
"column with enclosure """", and comma inside text","second column enclosure in text """""
"columns with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
{
"destination": "in.c-main.escaping",
"incremental": false
"incremental": false,
"schema": [
{
"nullable": true,
"primary_key": false,
"metadata": {
"KBC.sourceName": "col1",
"KBC.sanitizedName": "col1",
"KBC.uniqueKey": false
},
"name": "col1",
"data_type": {
"base": {
"type": "STRING"
}
}
},
{
"nullable": true,
"primary_key": false,
"metadata": {
"KBC.sourceName": "col2",
"KBC.sanitizedName": "col2",
"KBC.uniqueKey": false
},
"name": "col2",
"data_type": {
"base": {
"type": "STRING"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"col1","col2"
"line with enclosure","second column"
"column with enclosure """", and comma inside text","second column enclosure in text """""
"columns with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
{
"destination": "in.c-main.escaping",
"incremental": false
"incremental": false,
"columns": [
"col1",
"col2"
],
"column_metadata": {
"col1": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col1"
},
{
"key": "KBC.sanitizedName",
"value": "col1"
},
{
"key": "KBC.uniqueKey",
"value": false
}
],
"col2": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col2"
},
{
"key": "KBC.sanitizedName",
"value": "col2"
},
{
"key": "KBC.uniqueKey",
"value": false
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"col1","col2"
"line with enclosure","second column"
"column with enclosure """", and comma inside text","second column enclosure in text """""
"columns with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
{
"destination": "in.c-main.escaping",
"incremental": false
"incremental": false,
"columns": [
"col1",
"col2"
],
"column_metadata": {
"col1": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col1"
},
{
"key": "KBC.sanitizedName",
"value": "col1"
},
{
"key": "KBC.uniqueKey",
"value": false
}
],
"col2": [
{
"key": "KBC.datatype.nullable",
"value": true
},
{
"key": "KBC.datatype.basetype",
"value": "STRING"
},
{
"key": "KBC.sourceName",
"value": "col2"
},
{
"key": "KBC.sanitizedName",
"value": "col2"
},
{
"key": "KBC.uniqueKey",
"value": false
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"col1","col2"
"line with enclosure","second column"
"column with enclosure """", and comma inside text","second column enclosure in text """""
"columns with
Expand Down
Loading

0 comments on commit 4c16c1f

Please sign in to comment.