Create or replace source tables
To create or replace source tables, perform the following HTTP requests.
Create Source Tables
POST "https://<hostname>/mining/api/pub/dataIngestion/v1/dataSets/<data set>/sourceTables"
You must send a request body to the server in the following form (here with sample data):
[
{
"name": "table_a",
"namespace": "default",
"columns": [
{
"dataType": "STRING",
"name": "column_a1"
},
{
"dataType": "LONG",
"name": "column_a2"
},
{
"dataType": "DOUBLE",
"name": "column_a3"
},
{
"dataType": "FORMATTED_TIMESTAMP",
"name": "column_a4",
"format": "yyyy-MM-dd HH:mm:ss.SSS"
}
]
},
{
"name": "table_b",
"namespace": "default",
"persistenceMode": "OVERWRITE",
"columns": [
...
]
}
]
Replace Source Tables
POST "https://<hostname>/mining/api/pub/dataIngestion/v1/dataSets/<data set>/sourceTables?forceReplace=true"
You must send a request body to the server in the following form (here with sample data):
[
{
"fullyQualifiedName": "default.table_a",
"columns": [
{
"dataType": "STRING",
"name": "column_a1"
},
{
"dataType": "LONG",
"name": "column_a2"
},
{
"dataType": "DOUBLE",
"name": "column_a3"
},
{
"dataType": "FORMATTED_TIMESTAMP",
"name": "column_a4",
"format": "yyyy-MM-dd HH:mm:ss.SSS"
}
]
},
{
"fullyQualifiedName": "default.table_b",
"persistenceMode": "OVERWRITE"
}
]
If no persistence mode (persistenceMode) is set, the table is created or replaced with persistenceMode = OVERWRITE.