I have a custom export of several tables and their columns in multilevel yaml format.
example extract modified with dummy values:
schemas:
- name: exports
tables:
- name: sugar
description: makes stuff sweet
active_date: 2019-01-07 00:00:00
columns:
- name: color
type: abcd
- name: taste
type: abcd
description: xyz
example: 21352352
- name: structure
type: abcd
description: xyzasaa
example: 10001
- name: salt
description: not that sweet.
makes it salty.
active_date: 2018-12-18 00:00:00
columns:
- name: strength
type: abcdef
description: easy to find
example: 2018-03-03 12:30:00
- name: color
type: abcdeffa
description: not sweet
example: 21352352
- name: quality
type: abcd
description: how much is needed
example: 10001
I need to ingest this data in hive table using some serde. I am familiar with jsonSerde but unfortunately this format is not supported and so looking for an alternate way. Can someone suggest an optimum approach? Can a regexSerde help at all with what I am trying to achieve?
Hive table Data can be represented maybe in one of the below ways:
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th>Level 1(name)</th><th>Level 2(name)</th><th>Level 2 (type)</th><th>Level 2 (description)</th></tr></thead><tbody>
<tr><td>sugar</td><td>color</td><td>abcd</td><td> </td></tr>
<tr><td>sugar</td><td>taste</td><td>abcd</td><td>xyz</td></tr>
<tr><td>sugar</td><td>structure</td><td>abcd</td><td>xyzasaa</td></tr>
<tr><td>salt</td><td>strength</td><td>abcdef</td><td>easy to find</td></tr>
<tr><td>salt</td><td>color</td><td>abcdeffa</td><td>not sweet</td></tr>
<tr><td>salt</td><td>quality</td><td>abcd</td><td>how much is needed</td></tr>
</tbody></table>
--- or ---
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th>Level 1(name.colum)</th><th>Level 2 (type)</th><th>Level 2 (description)</th></tr></thead><tbody>
<tr><td>sugar.color</td><td>abcd</td><td> </td></tr>
<tr><td>sugar.taste</td><td>abcd</td><td>xyz</td></tr>
<tr><td>sugar.structure</td><td>abcd</td><td>xyzasaa</td></tr>
<tr><td>salt.strength</td><td>abcdef</td><td>easy to find</td></tr>
<tr><td>salt.color</td><td>abcdeffa</td><td>not sweet</td></tr>
<tr><td>salt.quality</td><td>abcd</td><td>how much is needed</td></tr>
</tbody></table>
EDIT: Using simplest approach I was able to extract below:
$ grep -P '(?<=- name: ).*' export.yaml
- name: exports
- name: sugar
- name: color
- name: taste
- name: structure
- name: salt
- name: strength
- name: color
- name: quality
but how do I establish the indentation relationship so that result is like :
sugar.color,sugar.taste,sugar.structure
salt.strength,salt.color,salt.quality
Related
I added a custom style in my variables.scss to change my alert but I'm not sure how I can apply this. I already saw this question but it did not help me. Do I have to put this in my typescript? If yes, how?
my variabless.scss
.alert-wrapper {
border-radius: 13px;
overflow: hidden;
max-width: 270px;
background-color: #f8f8f8;
-webkit-box-shadow: none;
box-shadow: none;
}
my html calling the alert
<button ion-button color="babydanger" (click)="showCheckbox()">SIGN UP</button>
my .ts
showCheckbox() {
let alert = this.alertCtrl.create();
alert.setTitle('Which planets have you visited?');
alert.addInput({
type: 'checkbox',
label: 'Alderaan',
value: 'value1',
checked: true
});
alert.addInput({
type: 'checkbox',
label: 'Bespin',
value: 'value2'
});
The default behavior of the tooltip on google chart's legend is showing only when the word is broken for being too long.
What I want to do is to always show the tooltip regardless of the word being complete or not. Is this possible?
You could try to overwrite the tooltip functionality to display the text. Made an example using jquery, however it also makes tooltips for title and axis ticks, but should be close to what you want:
function myReadyHandler(){
$('g text').mouseenter(function(e){
if($(this).text().indexOf('...')!= -1) return;
$('.charts-tooltip').hide();
$('body').append('<div style="position: absolute; visibility: visible; left: '+(e.pageX-50)+'px; top: '+(e.pageY+20)+'px;" class="charts-tooltip"><div style="background-color: infobackground; padding: 1px; border: 1px solid infotext; font-size: 14px; margin: 14px; font-family: Arial; background-position: initial initial; background-repeat: initial initial;">'+$(this).text()+'</div></div>');
})
$('g').mouseleave(function(e){
$('.charts-tooltip').hide();
})
}
google.visualization.events.addListener(chart, 'ready', myReadyHandler);
Here is a working example: http://jsfiddle.net/Lwkorqn9/
I am using 2 regions with 1 region display selector to create some tab functionality between regions. See the following as an example: http://apex.oracle.com/pls/apex/f?p=19914:30 I used the following to remove the 'Show All' button http://apexplained.wordpress.com/2012/07/16/hide-the-show-all-tab-in-a-region-selector/
Mine looks the same as the example above however it doesnt have the rounded corners on the region display selector.
I wondered how you can apply the rounded corners to the display selector, increase the font size and height of the region display selector?
I've tried style="" in the 'Region Attributes' of the Region display selector but no luck. When investigating my page in Firefox using Firebug the display selector is held in a DIV / in an UL list but i wouldnt know how to access those in the APEX builder.
The region display selector has rounded corners when using Chrome, but not in Internet Explorer.
Please could i have some help with my problem.
Oracle Version: Oracle version 10.2.0.4.0
Full APEX version: Application Express 4.1.1.00.23
Browser(s) and version(s) used: Internet Explorer 7 & 8
Theme: Simple Red
Template(s): The standard templates with the Simple Red theme.
Region/item type(s): 3 HTML pages each holding text box fields.
Thank you.
See example below of region display selector:
Example of region selector html from Simple Red theme
<div class="apex-rds-container">
<ul class="apex-rds" id="485041125812774413_RDS">
<li class="apex-rds-first">
<span>Show All</span>
</li>
<li class="apex-rds-selected">
<span>datepicker</span>
</li>
<li class="apex-rds-last">
<span>region 2</span>
</li>
</ul>
</div>
inspect style tab for
DIV
.apex-rds-container {
height: 40px;
margin: 0 0 9px;
}
UL
ul.apex-rds {
background: url("../images/bg-anchor-nc.gif") repeat-x scroll 0 0 transparent;
border: 1px solid #999999;
border-radius: 8px 8px 8px 8px;
box-shadow: 1px 2px 2px #AAAAAA;
float: left;
list-style-type: none;
margin: 0;
}
LI
ul.apex-rds li {
float: left;
list-style: none outside none;
}
A
ul.apex-rds li.apex-rds-first a {
border-left: 0 solid #000000;
}
ul.apex-rds li a {
border-left: 1px solid #FFFFFF;
border-right: 1px solid #999999;
display: block;
height: 16px;
padding: 1px 10px 0;
text-decoration: none;
}
a {
color: #660000;
}
SPAN
ul.apex-rds li span {
color: #000000;
font-size: 11px;
}
So, this shows that a background image is used for the UL. This image's dimensions are 1x18px according to firebug. Hovering over an item will set a different background image, as will a current region selection.
So, if you want a larger selection, use a larger image. Increase the div height. Set the correct styles for current/non-current items.
To increase font size, alter the css for the SPAN.
Borders are done with border-radius: 8px 8px 8px 8px; which don't work in IE.
All css can be found in the theme css file in your apex_images folder: /i/themes/theme1/css/theme_4_0.css
Go to line 1316,
/* -------------------- Region Display Selector -------------------- */
You can find everything you need there.
Don't mess in that file though. If you will, make a backup. Work clean and override properly within a css of your own!
I have seen many answers on the line of
How to change the cell color of a jquery datepicker
But they for some reason do not apply to my example.
http://plungjan.name/test/datepicker_orange.html
I want the WHOLE cell content to be orange, not just what we can see behind the link IN the cell
So what I can see as
.ui-state-default {
background: url("images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #E6E6E6;
border: 1px solid #D3D3D3;
color: #555555;
font-weight: normal;
}
which controls the link inside the cell with a class name set by me to "orange"
<td class=" orange" onclick="DP_jQuery_1327604402271.datepicker._selectDay('#toDate',1,2012, this);return false;" title="Almost sold out">
<a class="ui-state-default" href="#">15</a>
</td>
where the orange class is given by me in this code:
return [true,"orange","Almost sold out"];
It shows
and not
Which I can get if I remove the background image of the above ui-state-default in firebug
What is the correct method of changing the complete cell color of the cells I now change using the beforeShowDay?
I tried helping the situation by overriding the default:
.ui-state-default {
background-color: transparent;
border: 1px solid #D3D3D3;
color: #555555;
font-weight: normal;
}
Did not make any diffence
#mplungjan Change css to this:
td.highlight {border: none !important;padding: 1px 0 1px 1px !important;background: none !important;overflow:hidden;}
td.highlight a {background: #99dd73 url(bg.png) 50% 50% repeat-x !important; border: 1px #88a276 solid !important;}
If you put your class directly on the tag you have to change it to this:
.ui-state-default {
background: #E6E6E6;
border: 1px solid #D3D3D3;
color: #555555;
font-weight: normal;
}
In CSS if you have a backgorund image and a background color then the browser will show you the image which in this case is that gradient grey that you have in the first example.
I was wondering about the feasibility (in terms of speed, etc) of retrieving the amount of likes for a specific thing (website, facebook page, etc) into a table.
For example, let's say anywhere between 20 - 100.
Is this practical? Thank you :)
This example Assumes you are using php-sdk 3.1.1. you can see the sample here and login at the bottom, also at the bottom is the time it takes to make the graph call and render it from server side. I only have 500+ likes it took about 1700ms to load.
https://shawnsspace.com/plugins/TimeLineLikes.php
<?php
echo '<div style="text-align: center; width: 100%;">';
echo '<p>My Likes...</p>';
$i==0;
$MElikes = $facebook->api('/me/likes?limit=1000&access_token='.$_SESSION['fb_135669679827333_access_token'].'');
foreach ($MElikes as $key=>$value) {
foreach ($value as $fkey=>$fvalue) {
$thisid=$fvalue[id];
if($thisid==h){}else{
$i++;
echo '<div onclick="" class="thisalbum" align="left" style="border: 1px inset; white-space:nowrap; width: 23%; max-width: 23%; height: 86px; margin: 2px; padding: 2px; display: inline-block; overflow: hidden; vertical-align: bottom;">';
echo '<div style="background-image:url(\'https://graph.facebook.com/' . $thisid . '/picture\'); background-repeat: no-repeat; background-position:right top; width: 50px; height: 50px; margin: 2px;"></div>';
echo ''.$fvalue[category].'<br />';
echo '' . $fvalue[name] . '';
echo '</div>';
}
};
}
echo '<b>'.$i.' Total Likes Found</b>';
if ($i==0){
echo 'No Likes found. Go Back';
}
echo '</div>';
?>