fluent / fluent-plugin-sql

SQL input/output plugin for Fluentd
108 stars 59 forks source link

Tables and views in schemas are not supported (PostgreSQL) #22

Open static-max opened 8 years ago

static-max commented 8 years ago

If I want to use a view thats inside a schema, I get the following error:

2015-12-11 14:49:10 +0100 [warn]: Can't handle 'data.my-view' table. Ignoring. error="wrong constant name Data.my_view" error_class=NameError
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-sql-0.4.3/lib/fluent/plugin/in_sql.rb:81:in `const_set'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-sql-0.4.3/lib/fluent/plugin/in_sql.rb:81:in `init'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-sql-0.4.3/lib/fluent/plugin/in_sql.rb:207:in `block in start'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-sql-0.4.3/lib/fluent/plugin/in_sql.rb:205:in `reject!'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-sql-0.4.3/lib/fluent/plugin/in_sql.rb:205:in `start'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/root_agent.rb:111:in `block in start'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/root_agent.rb:110:in `each'
  2015-12-11 14:49:10 +0100 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.12/lib/fluent/root_agent.rb:110:in `start'

Creating the view in the "public" schema is currently the only workaround I see.

repeatedly commented 8 years ago

It seems current ActiveRecord limitation. Hmm... we need to research how to map schema name to ActiveRecord's model.

roligupt commented 4 years ago

are tables and views in a schema supported now? The table i am trying to write the data to is in the schema.

roligupt commented 4 years ago

It seems current ActiveRecord limitation. Hmm... we need to research how to map schema name to ActiveRecord's model.

are tables and views in a schema supported now? The table i am trying to write the data to is in the schema.