Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-13 Thread Simon Su
OK, Thanks Jark Thanks, SImon On 08/13/2019 14:05,Jark Wu wrote: Hi Simon, This is a temporary workaround for 1.9 release. We will fix the behavior in 1.10, see FLINK-13461. Regards, Jark On Tue, 13 Aug 2019 at 13:57, Simon Su wrote: Hi Jark Thanks for your reply. It’s weird that

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-13 Thread Jark Wu
Hi Simon, This is a temporary workaround for 1.9 release. We will fix the behavior in 1.10, see FLINK-13461. Regards, Jark On Tue, 13 Aug 2019 at 13:57, Simon Su wrote: > Hi Jark > > Thanks for your reply. > > It’s weird that In this case the tableEnv provide the api called >

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Simon Su
Hi Jark Thanks for your reply. It’s weird that In this case the tableEnv provide the api called “registerCatalog”, but it does not work in some cases ( like my cases ). Do you think it’s feasible to unify this behaviors ? I think the document is necessary, but a unify way to use tableEnv is

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Jark Wu
I think we might need to improve the javadoc of tableEnv.registerTableSource/registerTableSink. Currently, the comment says "Registers an external TableSink with already configured field names and field types in this TableEnvironment's catalog." But, what catalog? The current one or default

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Xuefu Z
Yes, tableEnv.registerTable(_) etc always registers in the default catalog. To create table in your custom catalog, you could use tableEnv.sqlUpdate("create table "). Thanks, Xuefu On Mon, Aug 12, 2019 at 6:17 PM Simon Su wrote: > Hi Xuefu > > Thanks for you reply. > > Actually I have

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Simon Su
Hi Xuefu Thanks for you reply. Actually I have tried it as your advises. I have tried to call tableEnv.useCatalog and useDatabase. Also I have tried to use “catalogname.databasename.tableName” in SQL. I think the root cause is that when I call tableEnv.registerTableSource, it’s always use

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Xuefu Z
Hi Simon, Thanks for reporting the problem. There is some rough edges around catalog API and table environments, and we are improving post 1.9 release. Nevertheless, tableEnv.registerCatalog() is just to put a new catalog in Flink's CatalogManager, It doens't change the default catalog/database

Re: Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Dawid Wysakowicz
Hi Simon, First of all for more thorough discussion you might want to have a look at this thread: https://lists.apache.org/thread.html/b450df1a7bf10187301820e529cbc223ce63f233c1af0f0c7415e62b@%3Cdev.flink.apache.org%3E TL;DR; All objects registered with registerTable/registerTableSource are

Flink cannot recognized catalog set by registerCatalog.

2019-08-12 Thread Simon Su
Hi All I want to use a custom catalog by setting the name “ca1” and create a database under this catalog. When I submit the SQL, and it raises the error like : Exception in thread "main" org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 98 to