Skip to content

Commit 68b65f1

Browse files
committed
Check that you have any output tables defined in the flex config
Without tables defined there isn't anything to do. So this means something is wrong with your configuration. Possibly you are using a Lua transform config for the pgsql output instead of a flex config. Fixes #1332
1 parent 506e755 commit 68b65f1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/output-flex.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,11 @@ output_flex_t::output_flex_t(
13881388
init_lua(m_options.style);
13891389
}
13901390

1391+
if (m_tables->empty()) {
1392+
throw std::runtime_error{
1393+
"No tables defined in Lua config. Nothing to do!"};
1394+
}
1395+
13911396
assert(m_table_connections.empty());
13921397
for (auto &table : *m_tables) {
13931398
m_table_connections.emplace_back(&table, m_copy_thread);

0 commit comments

Comments
 (0)