Embedding hyperlinks in Snowflake table fields - hyperlink

Is it possible to house a clickable URI inside a table row & field in Snowflake?
Example: Table product_master w fields product_name, prod_num, prod_family, prod_price, prod_brochure where prod_brochure is a clickable URI to the slick brochure that can be printed out.

Yes, if your browser (or wherever you're viewing your Snowflake results) supports making the VARCHAR/text link clickable, as Simon D mentions. Here's a Snowflake query snippet where I make a link from an id column to link to a Salesforce object. Google Chrome automatically makes it clickable in the Snowflake query results using the classic Snowflake worksheet interface:
SELECT 'https://mycompany.lightning.force.com/lightning/r/SF_custom_object_c/' || id || '/view' AS sf_job_link, ...
The results in a Snowflake web UI/Chrome clickable link:

Related

Tableau calculated field - How do I select narrow down selections from tables?

I am working on narrowing down the selection from three tables. The hierarchy looks like the link below.
PublisherAccountID includes a list of PublisherName, and within Publisher name, it contains a list of Imprint.
PublisherAccountID > PublisherName > Publisher Imprint
I am creating narrowing options for each hierarchy on Tableau.
For example, if I have two PublisherAccountID, A and B, A contains 1,2,3 while B contains 4,5,6. If I select A, then the option for PublisherName will now show 456.
Sorry I don't know how to not embed pciture link. The heiracy is below
enter image description here
Have you grouped the fields? You can always create a group. You can name the group from the 2nd level i.e. B, and group the relevant items (4,5,6). You can then use the new Group field as a filter.

App Inventor Fusion Table Column calling

I developed an app based on App Inventor and Fusion Tables. When I want to update total money by adding some money to already existing money it is giving some error.
When I use SELECT command to get information from fusion table it is taking then number with column Name. When i am trying to add both of them it is giving following error.
Error message
The result from a fusiontable includes always the header row...
from your example SELECT statement the result is
TotalPaid
5000
Obviously to add any value to that result will result in an error, because you only can add numeric values...
You first have to extract the value (in your example 5000) from the result. Convert the result into a list using the split block, just split at \n (new value) to get a list, then select the 2nd item using the select list item block.
Note: to be able to update something in a table, you need the ROWID, see also the SQL Reference Documentation of the Fusion Tables API.
For UPDATE statements the first step to be done is to get the ROWID of the row to be updated with a SELECT statement. The second step is to do the UPDATE.

XPath queries to scrape data

I'm using Copy XPath from Chrome to create my queries. It works very well but not for this question.
Here is the site I scrape data from.
One query that works (number next to "Senaste NAV-kurs" in table 1)
=IMPORTXML("http://www.di.se/di-fonder/fonddetaljer/?InstrumentId="&1085603;"//*[#id='fund-summary-wrap']/div[1]/dl[2]/dd/text()" )
But when I copy XPath from table with title "AVKASTNING" i'm getting no data, pls help
=IMPORTXML("http://www.di.se/di-fonder/fonddetaljer/?InstrumentId="&1085603;"//*[#id='ctl00_FourColumnWidthContent_ThreeColumnsContent_MainAndSecondColumnContent_fundInfo_fundPerformance_tableFund']/tbody/tr[4]/td[2]/span" )
If you are willing to try it another way, the following will get the "AVKASTNING" table.
=IMPORTHTML("http://www.di.se/di-fonder/fonddetaljer/?InstrumentId=1085603","table",7)
If you want a specific value from the table use index. The following example gets the second row second column value:
=index(IMPORTHTML("http://www.di.se/di-fonder/fonddetaljer/?InstrumentId=1085603","table",7),2,2)

Mapping Values in Qlikview

In Qlikview, I have an excel sheet that I use to map USERNAME to a TEAM value. But everytime I refresh the dashboard, new USERNAME values come up and since they are not in the excel sheet, these USERNAME values show up as their own value in the TEAM column. How would I make it so that any USERNAME that is not in the excel sheet shows up as 'Unidentified' or another value under the TEAM column instead of showing up as their own separate value?
First of all when posting question here if possible always include the source code so everybody will have more clear picture about your problem. Just saying.
On the topic ...
Use the mapping load in this case with supplying the third parameter. For example:
TeamMapping:
Mapping
Load
UserName,
Team
From
[User_to_Team_Mapping.xlsx] (ooxml, embedded labels, table is [Sheet1])
;
Transactions:
Load
Id,
Amount,
ApplyMap( 'TeamMapping', User, 'Unidentified') as Team
From
Transactions.qvd (qvd)
;
The third parameter in ApplyMap is the default string value when mapping value was not found in the mapping table (TeamMapping)

Orbeon - how to set values of numerous fields with one query

I have created a database service that retrieves numerous columns. I have successfully created the action to call other queries which passes in a parameter and displays the output in drop-down box or check boxes. HOWEVER, with this new query I would like to set the values of 5 different fields on the form based on the single query call. What xpath expression syntax is needed in the 'Set Response Control Values' section in order to make this work.....or is this not the right place or way to do this?
Sounds like you're using Form Builder - in the "Set Response Control Values" section in the Actions Editor, you should set up one item for each form field to be updated, with the Destination Control drop-down specifying the form field. So in your case you'll have 5 rows pointing to your 5 fields.
Let's assume that your query returns a single row, with the values that will go into your form fields in separate columns. Your query results come from the database service looking like this:
<response>
<row>
<query-column-1>value</query-column-1>
<query-column-2>value</query-column-2>
...
</row>
</response>
So if the column name for your first item is "id", the "Set Response Control Values" entry would look like this:
/response/row/id
There is one gotcha...if a column name in the database includes an underscore, this will be converted to a hyphen in the results from the database service. So if your column name was "asset_id" you'd put response/row/asset-id.
If your query returns multiple rows, you can refer to a specific row using a predicate, like so: response/row[1]/id

Resources