fluent-plugin-sql icon indicating copy to clipboard operation
fluent-plugin-sql copied to clipboard

Tables and views in schemas are not supported (PostgreSQL)

Open static-max opened this issue 9 years ago • 3 comments

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.

static-max avatar Dec 11 '15 13:12 static-max

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

repeatedly avatar Dec 23 '15 18:12 repeatedly

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

roligupt avatar Aug 20 '20 06:08 roligupt

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.

roligupt avatar Aug 20 '20 06:08 roligupt