Add AWS credentials to hdfs-site.xml
fs.s3a.awsAccessKeyId=XXXX
fs.s3a.awsSecretAccessKey=YYYY
<property>
<name>fs.s3a.access.key</name>
| import matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| import numpy as np | |
| import pandas as pd | |
| %matplotlib inline |
| df.write.format("orc").saveAsTable("my_table_name") |
Add AWS credentials to hdfs-site.xml
fs.s3a.awsAccessKeyId=XXXX
fs.s3a.awsSecretAccessKey=YYYY
<property>
<name>fs.s3a.access.key</name>
| select to_char(<mydate>, 'day') | |
| from mytable |
Original table:
k | v
----------
A | 1
A | 2
A | 3
B | 6
B | 7
| hive -hiveconf tez.queue.name=<name> |
| UNIX_TIMESTAMP(timestamp) | |
| FROM_UNIXTIME(timestamp, "format") |
| # new solution (N is the number of elements) | |
| ax.set_prop_cycle('color',plt.cm.rainbow(np.linspace(0,1,N))) | |
| # the solution below is deprecated | |
| cm = plt.get_cmap('gist_rainbow') | |
| ax.set_color_cycle([cm(1.*i/len(YOUR_LIST)) for i in np.arange(len(YOUR_LIST))]) |
| # horizontal line | |
| ax.axhline(0.5, color="gray") | |
| # vertical line | |
| ax.axvline(0.5, color="gray") |