Hi, i want to know can we ingest only 1 table from...
# ingestion
r
Hi, i want to know can we ingest only 1 table from the database? thanks before!!
b
use both schema_pattern.deny/allow and table_pattern.deny/allow to target the table you want
r
{
       
"source": {
           
"type": "postgres",
           
"config": {
               
"username": "postgres",
               
"password": "strongpass",
               
"database": "northwind",
               
"host_port": "localhost:5432",
               
"database_alias": "huh",
               
"env":"per_tab",
               
"table_pattern":{
                   
"allow":{
                       
"public.customers"
                   
}
               
},
               
"schema_pattern":{
                   
"allow":{
                       
"public"
                   
}
               
}
           
},
       
},
       
"sink": {
           
"type": "datahub-rest",
           
"config": {"server": "<http://localhost:8080>"},
       
},
   
}
)
isit right? but ints not ingest anything
b
1. could you try removing the env option? I don't think per_tab is a valid value. 2. isnt recipes in yaml format? why does it look json 3. if you ingest in CLI, there should be some output console msgs about tables it skipped
r
thankyou for theresponse 1. im trying to put the db on specific env 2. I'm ingesting using package datahub.ingestion.run.pipeline 3. its return
'workunits_produced': 0,
'workunit_ids': [],
'warnings': {},
'failures': {},
'tables_scanned': 14,
'views_scanned': 0,
'entities_profiled': 0,
'filtered': ['information_schema.*',
'<http://huh.public.us|huh.public.us>_states',
'huh.public.customers',
'huh.public.orders',
'huh.public.employees',
'huh.public.shippers',
'huh.public.products',
'huh.public.order_details',
'huh.public.categories',
'huh.public.suppliers',
'huh.public.region',
'huh.public.territories',
'huh.public.employee_territories',
'huh.public.customer_demographics',
'huh.public.customer_customer_demo'],
'soft_deleted_stale_entities': [],
and its working if im ingesting whole db
b
so the schema_pattern and table_pattern is causing the table to be filtered out and not processed. you should tweak the regex pattern and see how to best target the table. I'm not sure you can set an arbitary env, there's a very restrictive set of enums for that (but your problem hasnt hit that point yet, right now it hasnt attempted to read the table)
r
ohh thankyou @better-orange-49102 i can ingest the table to existing env, its get error when I tried to ingest and make new env at the same time. thank you!!