Forum Discussion

jaryszek's avatar
jaryszek
Super User
4 years ago
Solved

Trying to make additional column from source table

Hi,


i am adding additional column with data source, like if SourceKind = "Web" then Csv.Document(Web.Contents([Connector]),[Delimiter=",", Encoding=1250, QuoteStyle=QuoteStyle.None]) else [Connector]) 

 

And it is working for Web files. 
But i have also Connector = 

=PostgreSQL.Database("127.0.0.1:9998", "junit")

 and from this power query seeing this as text not as source.

How to make from this string source table in additional column?

 

Please help,

Best,
Jacek

  •  

    = if SourceKind = "Web" then Csv.Document(Web.Contents([Connector]),[Delimiter=",", Encoding=1250, QuoteStyle=QuoteStyle.None]) else Expression.Evaluate(Text.RemoveRange([Connector],0), [PostgreSQL.Database = PostgreSQL.Database])

     

2 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Community Champion

     

    = if SourceKind = "Web" then Csv.Document(Web.Contents([Connector]),[Delimiter=",", Encoding=1250, QuoteStyle=QuoteStyle.None]) else Expression.Evaluate(Text.RemoveRange([Connector],0), [PostgreSQL.Database = PostgreSQL.Database])