1&&"string"==typeof d&&!pe.checkClone&&nt.test(d))return e.each(function(n){var i=e.eq(n);g&&(t[0]=d.call(this,n,i.html())),N(i,t,r,o)});if(p&&(i=x(t,e[0].ownerDocument,!1,e,o),s=i.firstChild,1===i.childNodes.length&&(i=s),s||o)){for(a=de.map(v(i,"script"),k),u=a.length;f=0&&nC.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[$]=!0,e}function o(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&je(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function h(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;o-1&&(r[c]=!(s[c]=f))}}else x=v(x===s?x.splice(d,x.length):x),i?i(null,s,x,u):K.apply(s,x)})}function x(e){for(var t,n,r,o=e.length,i=C.relative[e[0].type],s=i||C.relative[" "],a=i?1:0,u=d(function(e){return e===t},s,!0),c=d(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var o=!i&&(r||n!==N)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,o}];a1&&g(l),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,i=e.length>0,s=function(r,s,a,u,c){var l,f,p,h=0,d="0",g=r&&[],m=[],y=N,x=r||i&&C.find.TAG("*",c),b=B+=null==y?1:Math.random()||.1,w=x.length;for(c&&(N=s===L||s||c);d!==w&&null!=(l=x[d]);d++){if(i&&l){for(f=0,s||l.ownerDocument===L||(O(l),a=!F);p=e[f++];)if(p(l,s||L,a)){u.push(l);break}c&&(B=b)}o&&((l=!p&&l)&&h--,r&&g.push(l))}if(h+=d,o&&d!==h){for(f=0;p=n[f++];)p(g,m,s,a);if(r){if(h>0)for(;d--;)g[d]||m[d]||(m[d]=Q.call(u));m=v(m)}K.apply(u,m),c&&!r&&m.length>0&&h+n.length>1&&t.uniqueSort(u)}return c&&(B=b,N=y),g};return o?r(s):s}var w,T,C,j,k,E,S,A,N,q,D,O,L,H,F,R,I,P,M,$="sizzle"+1*new Date,W=e.document,B=0,_=0,U=n(),z=n(),X=n(),V=function(e,t){return e===t&&(D=!0),0},G={}.hasOwnProperty,Y=[],Q=Y.pop,J=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(ie),pe=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){O()},je=d(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(Y=Z.call(W.childNodes),W.childNodes),Y[W.childNodes.length].nodeType}catch(e){K={apply:Y.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=L.documentElement,F=!k(L),W!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=o(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=me.test(L.getElementsByClassName),T.getById=o(function(e){return H.appendChild(e).id=$,!L.getElementsByName||!L.getElementsByName($).length}),T.getById?(C.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&F){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&F){var n,r,o,i=t.getElementById(e);if(i){if(n=i.getAttributeNode("id"),n&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if(n=i.getAttributeNode("id"),n&&n.value===e)return[i]}return[]}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&F)return t.getElementsByClassName(e)},I=[],R=[],(T.qsa=me.test(L.querySelectorAll))&&(o(function(e){H.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+$+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||R.push(".#.+[+~]")}),o(function(e){e.innerHTML=" ";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),H.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(T.matchesSelector=me.test(P=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){T.disconnectedMatch=P.call(e,"*"),P.call(e,"[s!='']:x"),I.push("!=",ie)}),R=R.length&&new RegExp(R.join("|")),I=I.length&&new RegExp(I.join("|")),t=me.test(H.compareDocumentPosition),M=t||me.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===W&&M(W,e)?-1:t===L||t.ownerDocument===W&&M(W,t)?1:q?ee(q,e)-ee(q,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===L?-1:t===L?1:o?-1:i?1:q?ee(q,e)-ee(q,t):0;if(o===i)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===W?-1:u[r]===W?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&O(e),n=n.replace(le,"='$1']"),T.matchesSelector&&F&&!X[n+" "]&&(!I||!I.test(n))&&(!R||!R.test(n)))try{var r=P.call(e,n);if(r||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&O(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&O(e);var n=C.attrHandle[t.toLowerCase()],r=n&&G.call(C.attrHandle,t.toLowerCase())?n(e,t,!F):void 0;return void 0!==r?r:T.attributes||!F?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(D=!T.detectDuplicates,q=!T.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return q=null,e},j=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=j(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=j(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:!n||(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,p,h,d,g=i!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(m){if(i){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&y){for(p=m,f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],h=c[0]===B&&c[1],x=h&&c[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(x=h=0)||d.pop();)if(1===p.nodeType&&++x&&p===t){l[e]=[B,h,x];break}}else if(y&&(p=t,f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[e]||[],h=c[0]===B&&c[1],x=h),x===!1)for(;(p=++h&&p&&p[g]||(x=h=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++x||(y&&(f=p[$]||(p[$]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),l[e]=[B,x]),p!==t)););return x-=o,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var o,i=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[$]?i(n):i.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=S(e.replace(ae,"$1"));return o[$]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){
-return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||j(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=F?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=i[0]).type&&9===t.nodeType&&F&&C.relative[i[1].type]){if(t=(C.find.ID(s.matches[0].replace(xe,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=he.needsContext.test(e)?0:i.length;o--&&(s=i[o],!C.relative[a=s.type]);)if((u=C.find[a])&&(r=u(s.matches[0].replace(xe,be),ye.test(i[0].type)&&f(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&h(i),!e)return K.apply(n,r),n;break}}return(c||S(e,l))(r,t,!F,n,!t||ye.test(e)&&f(t.parentNode)||t),n},T.sortStable=$.split("").sort(V).join("")===$,T.detectDuplicates=!!D,O(),T.sortDetached=o(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),o(function(e){return e.innerHTML=" ","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&o(function(e){return e.innerHTML=" ",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);de.find=xe,de.expr=xe.selectors,de.expr[":"]=de.expr.pseudos,de.uniqueSort=de.unique=xe.uniqueSort,de.text=xe.getText,de.isXMLDoc=xe.isXML,de.contains=xe.contains,de.escapeSelector=xe.escape;var be=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&de(e).is(n))break;r.push(e)}return r},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Te=de.expr.match.needsContext,Ce=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,je=/^.[^:#\[\.,]*$/;de.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?de.find.matchesSelector(r,e)?[r]:[]:de.find.matches(e,de.grep(t,function(e){return 1===e.nodeType}))},de.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(de(e).filter(function(){for(t=0;t1?de.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Te.test(e)?de(e):e||[],!1).length}});var ke,Ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Se=de.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ee.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),Ce.test(r[1])&&de.isPlainObject(t))for(r in t)de.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=te.getElementById(r[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):de.isFunction(e)?void 0!==n.ready?n.ready(e):e(de):de.makeArray(e,this)};Se.prototype=de.fn,ke=de(te);var Ae=/^(?:parents|prev(?:Until|All))/,Ne={children:!0,contents:!0,next:!0,prev:!0};de.fn.extend({has:function(e){var t=de(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&de.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?de.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?se.call(de(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(de.uniqueSort(de.merge(this.get(),de(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,"parentNode")},parentsUntil:function(e,t,n){return be(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return be(e,"nextSibling")},prevAll:function(e){return be(e,"previousSibling")},nextUntil:function(e,t,n){return be(e,"nextSibling",n)},prevUntil:function(e,t,n){return be(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return e.contentDocument||de.merge([],e.childNodes)}},function(e,t){de.fn[e]=function(n,r){var o=de.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=de.filter(r,o)),this.length>1&&(Ne[e]||de.uniqueSort(o),Ae.test(e)&&o.reverse()),this.pushStack(o)}});var qe=/[^\x20\t\r\n\f]+/g;de.Callbacks=function(e){e="string"==typeof e?s(e):de.extend({},e);var t,n,r,o,i=[],a=[],u=-1,c=function(){for(o=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)i.splice(n,1),n<=u&&u--}),this},has:function(e){return e?de.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},de.extend({Deferred:function(t){var n=[["notify","progress",de.Callbacks("memory"),de.Callbacks("memory"),2],["resolve","done",de.Callbacks("once memory"),de.Callbacks("once memory"),0,"resolved"],["reject","fail",de.Callbacks("once memory"),de.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return de.Deferred(function(t){de.each(n,function(n,r){var o=de.isFunction(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=o&&o.apply(this,arguments);e&&de.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,r,o){function i(t,n,r,o){return function(){var c=this,l=arguments,f=function(){var e,f;if(!(t=s&&(r!==u&&(c=void 0,l=[e]),n.rejectWith(c,l))}};t?p():(de.Deferred.getStackHook&&(p.stackTrace=de.Deferred.getStackHook()),e.setTimeout(p))}}var s=0;return de.Deferred(function(e){n[0][3].add(i(0,e,de.isFunction(o)?o:a,e.notifyWith)),n[1][3].add(i(0,e,de.isFunction(t)?t:a)),n[2][3].add(i(0,e,de.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?de.extend(e,o):o}},i={};return de.each(n,function(e,t){var s=t[2],a=t[5];o[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),i[t[0]]=function(){return i[t[0]+"With"](this===i?void 0:this,arguments),this},i[t[0]+"With"]=s.fireWith}),o.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=re.call(arguments),i=de.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?re.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(c(e,i.done(s(n)).resolve,i.reject),"pending"===i.state()||de.isFunction(o[n]&&o[n].then)))return i.then();for(;n--;)c(o[n],s(n),i.reject);return i.promise()}});var De=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;de.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&De.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},de.readyException=function(t){e.setTimeout(function(){throw t})};var Oe=de.Deferred();de.fn.ready=function(e){return Oe.then(e).catch(function(e){de.readyException(e)}),this},de.extend({isReady:!1,readyWait:1,holdReady:function(e){e?de.readyWait++:de.ready(!0)},ready:function(e){(e===!0?--de.readyWait:de.isReady)||(de.isReady=!0,e!==!0&&--de.readyWait>0||Oe.resolveWith(te,[de]))}}),de.ready.then=Oe.then,"complete"===te.readyState||"loading"!==te.readyState&&!te.documentElement.doScroll?e.setTimeout(de.ready):(te.addEventListener("DOMContentLoaded",l),e.addEventListener("load",l));var Le=function(e,t,n,r,o,i,s){var a=0,u=e.length,c=null==n;if("object"===de.type(n)){o=!0;for(a in n)Le(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,de.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(de(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){Re.remove(this,e)})}}),de.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||de.isArray(n)?r=Fe.access(e,t,de.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=de.queue(e,t),r=n.length,o=n.shift(),i=de._queueHooks(e,t),s=function(){de.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:de.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),de.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ve=/^$|\/(?:java|ecma)script/i,Ge={option:[1,""," "],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Ye=/<|?\w+;/;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qe=te.documentElement,Je=/^key/,Ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;de.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,c,l,f,p,h,d,g,m=Fe.get(e);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),o&&de.find.matchesSelector(Qe,o),n.guid||(n.guid=de.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return"undefined"!=typeof de&&de.event.triggered!==t.type?de.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(qe)||[""],c=t.length;c--;)a=Ze.exec(t[c])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h&&(f=de.event.special[h]||{},h=(o?f.delegateType:f.bindType)||h,f=de.event.special[h]||{},l=de.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&de.expr.match.needsContext.test(o),namespace:d.join(".")},i),(p=u[h])||(p=u[h]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,d,s)!==!1||e.addEventListener&&e.addEventListener(h,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,l):p.push(l),de.event.global[h]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,c,l,f,p,h,d,g,m=Fe.hasData(e)&&Fe.get(e);if(m&&(u=m.events)){for(t=(t||"").match(qe)||[""],c=t.length;c--;)if(a=Ze.exec(t[c])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){for(f=de.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,p=u[h]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=p.length;i--;)l=p[i],!o&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(i,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(e,l));s&&!p.length&&(f.teardown&&f.teardown.call(e,d,m.handle)!==!1||de.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)de.event.remove(e,h+t[c],n,r,!0);de.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,s,a=de.event.fix(e),u=new Array(arguments.length),c=(Fe.get(this,"events")||{})[a.type]||[],l=de.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(i=[],s={},n=0;n-1:de.find(o,this,null,[c]).length),s[o]&&i.push(r);i.length&&a.push({elem:c,handlers:i})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Padrões do projeto
+
+Documentação
+Focamos em criar uma documentação concisa, utilizando os melhores padrões de escrita e organização de documentos. Para isso, utilizamos o Markdown, que é uma linguagem de marcação leve e fácil de usar, responsável tanto pelas documentações que você está lendo e as que estão disponíveis no repositório.
+Os arquivos recomendados para a documentação são:
+
+README.md
- Documentação principal do projeto
+CHANGELOG.md
- Registro de todas as alterações feitas no projeto
+CONTRIBUTING.md
- Guia de contribuição para o projeto
+CODE_OF_CONDUCT.md
- Código de conduta para os colaboradores
+COLABORATORS.md
- Lista de todos os colaboradores do projeto
+SECURITY.md
- Informações sobre como denunciar vulnerabilidades de segurança do projeto
+LICENSE
- Licença do projeto
+
+
+Além disso, nos atentamos em criar padrões para Issues e Pull Requests, para que a comunicação entre os colaboradores seja eficiente e clara. Os templates podem ser encontrados dentro de .github
.
+
+
+
+Pull Request
+Bug Issue
+Feature Request Issue
+
+
+
+
+PULL_REQUEST_TEMPLATE.md
+bug-report.yml
+feature-request.yml
+
+
+
+
+Changelog
+Tentamos criar uma pipeline (localizada em .github/release.yml
) para automatizar a criação de releases e a atualização do CHANGELOG.md
. A ideia é que a cada nova versão, o arquivo seja atualizado com as novas funcionalidades, correções e melhorias feitas. Porém não conseguimos criar uma release a tempo para testar o funcionamento.
+
+Deploy
+Para o deploy do MKDocs, utilizamos o GitHub Pages. A pipeline deploy-mkdocs.yml
dentro de .github/workflows
é responsável por fazer o deploy automático do site a cada nova alteração feita na branch main
e verificando somente arquivos em que há alterações que geram uma nova versão do MKDocs. A ideia é que o site seja atualizado automaticamente, sem a necessidade de intervenção humana.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/poetry.lock b/poetry.lock
index f0957ce..0c6a25e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -184,6 +184,20 @@ watchdog = ">=2.0"
i18n = ["babel (>=2.9.0)"]
min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.4)", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"]
+[[package]]
+name = "mkdocs-dracula-theme"
+version = "1.0.7"
+description = "🧛🏻♂️ Dark theme for Mkdocs"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "mkdocs-dracula-theme-1.0.7.tar.gz", hash = "sha256:fee49784a04b1d8432cd026edcd5333397e0926eeb59be3add0112df5d003682"},
+ {file = "mkdocs_dracula_theme-1.0.7-py3-none-any.whl", hash = "sha256:cb9a6bb7d9d6a958b1a4e7a0e55ba25fd25291cafe284ce3a4307bc609530855"},
+]
+
+[package.dependencies]
+mkdocs = ">=1.4.3"
+
[[package]]
name = "mkdocs-get-deps"
version = "0.2.0"
@@ -200,17 +214,6 @@ mergedeep = ">=1.3.4"
platformdirs = ">=2.2.0"
pyyaml = ">=5.1"
-[[package]]
-name = "mkdocs-gitbook"
-version = "0.0.1"
-description = "Default theme for GitBook for Mkdocs"
-optional = false
-python-versions = "*"
-files = [
- {file = "mkdocs-gitbook-0.0.1.tar.gz", hash = "sha256:c094f9d77e47d54379a0d3816097b56511e760fedb23dcf89bc925f6ac4e75f3"},
- {file = "mkdocs_gitbook-0.0.1-py2.py3-none-any.whl", hash = "sha256:e929c3caf655076eaa030128cfd104687b9ec14644d54f4a175d43e13ac60ef8"},
-]
-
[[package]]
name = "packaging"
version = "24.1"
@@ -395,4 +398,4 @@ watchmedo = ["PyYAML (>=3.10)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.12"
-content-hash = "dfe3fbd9a5b74db1b1a26482da5072d4295b8d4accc692be74c4877eaaa787c8"
+content-hash = "b068a2f7958b507a336ee6cf7dc692829a22c2fc3227c018aaf3ce3d6f136931"
diff --git a/pyproject.toml b/pyproject.toml
index af165de..e3c7e87 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,7 +8,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
mkdocs = "^1.6.0"
-mkdocs-gitbook = "^0.0.1"
+mkdocs-dracula-theme = "^1.0.7"
[tool.poetry.scripts]
serve = "mkdocs:serve"
diff --git a/sandbox/dags/__init__.py b/sandbox/dags/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/sandbox/dags/__pycache__/get_dag.cpython-312.pyc b/sandbox/dags/__pycache__/get_dag.cpython-312.pyc
new file mode 100644
index 0000000..2f9e168
Binary files /dev/null and b/sandbox/dags/__pycache__/get_dag.cpython-312.pyc differ
diff --git a/sandbox/dags/__pycache__/hello_dag.cpython-312.pyc b/sandbox/dags/__pycache__/hello_dag.cpython-312.pyc
new file mode 100644
index 0000000..36db83c
Binary files /dev/null and b/sandbox/dags/__pycache__/hello_dag.cpython-312.pyc differ
diff --git a/sandbox/dags/__pycache__/test_hello_spark.cpython-312.pyc b/sandbox/dags/__pycache__/test_hello_spark.cpython-312.pyc
new file mode 100644
index 0000000..029abb1
Binary files /dev/null and b/sandbox/dags/__pycache__/test_hello_spark.cpython-312.pyc differ
diff --git a/sandbox/dags/get_dag.py b/sandbox/dags/get_dag.py
new file mode 100644
index 0000000..a194a08
--- /dev/null
+++ b/sandbox/dags/get_dag.py
@@ -0,0 +1,138 @@
+from airflow.models import DAG
+from airflow.operators.python_operator import PythonOperator
+from airflow.utils.dates import days_ago
+from airflow.providers.postgres.hooks.postgres import PostgresHook
+from airflow.contrib.operators.spark_submit_operator import SparkSubmitOperator
+from airflow.hooks.base import BaseHook
+
+
+minio = BaseHook.get_connection('minio')
+
+
+
+def get_data():
+ pg_hook = PostgresHook.get_hook('postgres_database_base')
+ connection = pg_hook.get_conn()
+ cursor = connection.cursor()
+ cursor.execute("select COUNT(1) from vw_orders_etl")
+ countData = cursor.fetchall()
+ count = int(countData[0][0])
+ countDataValue = 0
+ countName = 1
+ while(countDataValue != count):
+ pg_hook.copy_expert("COPY (SELECT * FROM VW_ORDERS_ETL LIMIT 1000 offset " + str(countDataValue) + ") TO STDOUT WITH CSV HEADER", filename="/usr/local/spark/resources/orders/order" + str(countName) + ".csv")
+ countDataValue += 1000
+ countName += 1
+
+args = {
+ 'owner': 'Airflow',
+}
+
+with DAG(
+ dag_id='etl',
+ default_args=args,
+ schedule_interval=None,
+ start_date=days_ago(2),
+ tags=['ETL'],
+) as dag:
+
+ get_data_dag = PythonOperator(
+ task_id='etl_get_data',
+ provide_context=True,
+ python_callable=get_data,
+ dag=dag,
+ )
+
+ leading_dag = SparkSubmitOperator(
+ task_id="etl_leading",
+ application="/usr/local/spark/app/leading-spark.py",
+ name='ETL Spark Leading',
+ conn_id="spark_default",
+ verbose=1,
+ application_args=[str(25)],
+ conf={
+ "spark.master":'spark://spark:7077',
+ "spark.hadoop.fs.s3a.endpoint": minio.host,
+ "spark.hadoop.fs.s3a.access.key": minio.login,
+ "spark.hadoop.fs.s3a.secret.key": minio.password,
+ "spark.hadoop.fs.s3a.path.style.access": 'true',
+ "spark.driver.memory": "5g",
+ "spark.executor.memory": "3g",
+ "spark.yarn.am.memory": "1g",
+ "spark.hadoop.fs.s3a.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem"
+ },
+ packages="org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.12.262",
+ dag=dag
+ )
+
+ bronze_dag = SparkSubmitOperator(
+ task_id="etl_bronze",
+ application="/usr/local/spark/app/bronze-spark.py",
+ name='ETL Spark Bronze',
+ conn_id="spark_default",
+ verbose=1,
+ conf={
+ "spark.master":'spark://spark:7077',
+ "spark.hadoop.fs.s3a.endpoint": minio.host,
+ "spark.hadoop.fs.s3a.access.key": minio.login,
+ "spark.hadoop.fs.s3a.secret.key": minio.password,
+ "spark.hadoop.fs.s3a.path.style.access": 'true',
+ "spark.driver.memory": "5g",
+ "spark.executor.memory": "3g",
+ "spark.yarn.am.memory": "1g",
+ "spark.sql.extensions": "io.delta.sql.DeltaSparkSessionExtension",
+ "spark.sql.catalog.spark_catalog": "org.apache.spark.sql.delta.catalog.DeltaCatalog",
+ "spark.hadoop.fs.s3a.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem"
+ },
+ packages="org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.12.262,io.delta:delta-spark_2.12:3.2.0",
+ dag=dag
+ )
+
+ silver_dag = SparkSubmitOperator(
+ task_id="etl_silver",
+ application="/usr/local/spark/app/silver-spark.py",
+ name='ETL Spark Silver',
+ conn_id="spark_default",
+ verbose=1,
+ conf={
+ "spark.master":'spark://spark:7077',
+ "spark.hadoop.fs.s3a.endpoint": minio.host,
+ "spark.hadoop.fs.s3a.access.key": minio.login,
+ "spark.hadoop.fs.s3a.secret.key": minio.password,
+ "spark.hadoop.fs.s3a.path.style.access": 'true',
+ "spark.driver.memory": "5g",
+ "spark.executor.memory": "3g",
+ "spark.yarn.am.memory": "1g",
+ "spark.sql.extensions": "io.delta.sql.DeltaSparkSessionExtension",
+ "spark.sql.catalog.spark_catalog": "org.apache.spark.sql.delta.catalog.DeltaCatalog",
+ "spark.hadoop.fs.s3a.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem"
+ },
+ packages="org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.12.262,io.delta:delta-spark_2.12:3.2.0",
+ dag=dag
+ )
+
+ gold_dag = SparkSubmitOperator(
+ task_id="etl_gold",
+ application="/usr/local/spark/app/gold-spark.py",
+ name='ETL Spark Gold',
+ conn_id="spark_default",
+ verbose=1,
+ conf={
+ "spark.master":'spark://spark:7077',
+ "spark.hadoop.fs.s3a.endpoint": minio.host,
+ "spark.hadoop.fs.s3a.access.key": minio.login,
+ "spark.hadoop.fs.s3a.secret.key": minio.password,
+ "spark.hadoop.fs.s3a.path.style.access": 'true',
+ "spark.driver.memory": "5g",
+ "spark.executor.memory": "3g",
+ "spark.yarn.am.memory": "1g",
+ "spark.sql.extensions": "io.delta.sql.DeltaSparkSessionExtension",
+ "spark.sql.catalog.spark_catalog": "org.apache.spark.sql.delta.catalog.DeltaCatalog",
+ "spark.hadoop.fs.s3a.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem"
+ },
+ packages="org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.12.262,io.delta:delta-spark_2.12:3.2.0,org.postgresql:postgresql:42.2.20",
+ dag=dag
+ )
+
+ get_data_dag >> leading_dag >> bronze_dag >> silver_dag >> gold_dag
+
\ No newline at end of file
diff --git a/sandbox/dags/test_hello_spark.py b/sandbox/dags/test_hello_spark.py
new file mode 100644
index 0000000..d7693a4
--- /dev/null
+++ b/sandbox/dags/test_hello_spark.py
@@ -0,0 +1,40 @@
+from airflow.models import DAG
+from airflow.operators.dummy_operator import DummyOperator
+from airflow.contrib.operators.spark_submit_operator import SparkSubmitOperator
+from airflow.utils.dates import days_ago
+
+
+spark_master = "spark://spark:7077"
+spark_app_name = "Spark Hello World"
+file_path = "/usr/local/spark/resources/data/test.csv"
+
+args = {
+ 'owner': 'Airflow',
+}
+
+
+with DAG(
+ dag_id='test_spark_submit_operator',
+ default_args=args,
+ schedule_interval=None,
+ start_date=days_ago(2),
+ tags=['test'],
+) as dag:
+
+ start = DummyOperator(task_id="start", dag=dag)
+
+ spark_job = SparkSubmitOperator(
+ task_id="spark_job",
+ application="/usr/local/spark/app/hello-world-spark.py",
+ name=spark_app_name,
+ conn_id="spark_default",
+ verbose=1,
+ conf={"spark.master":spark_master},
+ application_args=[file_path],
+ dag=dag
+ )
+
+ end = DummyOperator(task_id="end", dag=dag)
+
+ start >> spark_job >> end
+
\ No newline at end of file
diff --git a/sandbox/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/sandbox/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb
new file mode 100644
index 0000000..954a245
--- /dev/null
+++ b/sandbox/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb
@@ -0,0 +1,35 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "85fdb364-89b7-4b8e-b462-e9c574292f42",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "print('HELP')"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.10.5"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/sandbox/notebooks/Untitled.ipynb b/sandbox/notebooks/Untitled.ipynb
new file mode 100644
index 0000000..3b24e85
--- /dev/null
+++ b/sandbox/notebooks/Untitled.ipynb
@@ -0,0 +1,144 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "e6822cdf-9e3d-41a9-8fe9-32f910b0d940",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Collecting s3fs\n",
+ " Downloading s3fs-2024.6.0-py3-none-any.whl (29 kB)\n",
+ "Collecting aiobotocore<3.0.0,>=2.5.4\n",
+ " Downloading aiobotocore-2.13.0-py3-none-any.whl (76 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.6/76.6 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting fsspec==2024.6.0.*\n",
+ " Downloading fsspec-2024.6.0-py3-none-any.whl (176 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m176.9/176.9 kB\u001b[0m \u001b[31m9.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting aiohttp!=4.0.0a0,!=4.0.0a1\n",
+ " Downloading aiohttp-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m17.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
+ "\u001b[?25hCollecting wrapt<2.0.0,>=1.10.10\n",
+ " Downloading wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m80.3/80.3 kB\u001b[0m \u001b[31m22.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting botocore<1.34.107,>=1.34.70\n",
+ " Downloading botocore-1.34.106-py3-none-any.whl (12.2 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.2/12.2 MB\u001b[0m \u001b[31m21.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
+ "\u001b[?25hCollecting aioitertools<1.0.0,>=0.5.1\n",
+ " Downloading aioitertools-0.11.0-py3-none-any.whl (23 kB)\n",
+ "Requirement already satisfied: attrs>=17.3.0 in /opt/conda/lib/python3.10/site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->s3fs) (21.4.0)\n",
+ "Collecting async-timeout<5.0,>=4.0\n",
+ " Downloading async_timeout-4.0.3-py3-none-any.whl (5.7 kB)\n",
+ "Collecting multidict<7.0,>=4.5\n",
+ " Downloading multidict-6.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m124.3/124.3 kB\u001b[0m \u001b[31m33.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting yarl<2.0,>=1.0\n",
+ " Downloading yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m301.6/301.6 kB\u001b[0m \u001b[31m28.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting frozenlist>=1.1.1\n",
+ " Downloading frozenlist-1.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m239.5/239.5 kB\u001b[0m \u001b[31m39.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hCollecting aiosignal>=1.1.2\n",
+ " Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n",
+ "Collecting jmespath<2.0.0,>=0.7.1\n",
+ " Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)\n",
+ "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /opt/conda/lib/python3.10/site-packages (from botocore<1.34.107,>=1.34.70->aiobotocore<3.0.0,>=2.5.4->s3fs) (2.8.2)\n",
+ "Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in /opt/conda/lib/python3.10/site-packages (from botocore<1.34.107,>=1.34.70->aiobotocore<3.0.0,>=2.5.4->s3fs) (1.26.9)\n",
+ "Requirement already satisfied: idna>=2.0 in /opt/conda/lib/python3.10/site-packages (from yarl<2.0,>=1.0->aiohttp!=4.0.0a0,!=4.0.0a1->s3fs) (3.3)\n",
+ "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.34.107,>=1.34.70->aiobotocore<3.0.0,>=2.5.4->s3fs) (1.16.0)\n",
+ "Installing collected packages: wrapt, multidict, jmespath, fsspec, frozenlist, async-timeout, aioitertools, yarl, botocore, aiosignal, aiohttp, aiobotocore, s3fs\n",
+ " Attempting uninstall: fsspec\n",
+ " Found existing installation: fsspec 2022.5.0\n",
+ " Uninstalling fsspec-2022.5.0:\n",
+ " Successfully uninstalled fsspec-2022.5.0\n",
+ "Successfully installed aiobotocore-2.13.0 aiohttp-3.9.5 aioitertools-0.11.0 aiosignal-1.3.1 async-timeout-4.0.3 botocore-1.34.106 frozenlist-1.4.1 fsspec-2024.6.0 jmespath-1.0.1 multidict-6.0.5 s3fs-2024.6.0 wrapt-1.16.0 yarl-1.9.4\n"
+ ]
+ }
+ ],
+ "source": [
+ "!pip install s3fs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "85fdb364-89b7-4b8e-b462-e9c574292f42",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import requests\n",
+ "import json\n",
+ "import os\n",
+ "import s3fs\n",
+ "import pyspark\n",
+ "from pyspark.sql import SparkSession\n",
+ "from pyspark import SparkContext\n",
+ "import pyspark.sql.functions as F"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "5fa55b7d-5f6a-4381-a9d3-e1657eaee285",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Define environment variables\n",
+ "os.environ[\"MINIO_KEY\"] = \"minio\"\n",
+ "os.environ[\"MINIO_SECRET\"] = \"minio123\"\n",
+ "os.environ[\"MINIO_ENDPOINT\"] = \"http://minio1:9000\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "51a3d6af-6b59-4e57-9fd2-c462b2bf55d5",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "spark = SparkSession.builder \\\n",
+ " .appName(\"country_data_analysis\") \\\n",
+ " .config(\"spark.jars.packages\", \"org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.11.1026\") \\\n",
+ " .config(\"spark.hadoop.fs.s3a.endpoint\", os.environ[\"MINIO_ENDPOINT\"]) \\\n",
+ " .config(\"spark.hadoop.fs.s3a.access.key\", os.environ[\"MINIO_KEY\"]) \\\n",
+ " .config(\"spark.hadoop.fs.s3a.secret.key\", os.environ[\"MINIO_SECRET\"]) \\\n",
+ " .config(\"spark.hadoop.fs.s3a.path.style.access\", \"true\") \\\n",
+ " .config(\"spark.hadoop.fs.s3a.impl\", \"org.apache.hadoop.fs.s3a.S3AFileSystem\") \\\n",
+ " .enableHiveSupport() \\\n",
+ " .getOrCreate()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "f0c3432f-c7e7-4ca4-9f24-13592ea4ee0d",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.10.5"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/search.html b/search.html
new file mode 100644
index 0000000..28adcdd
--- /dev/null
+++ b/search.html
@@ -0,0 +1,235 @@
+
+
+
+
+ Eccomerce-ED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search Results
+
+
+
+
+
+ Searching...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/search/search_index.json b/search/search_index.json
index 0af9dd4..a707c80 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Welcome to MkDocs For full documentation visit mkdocs.org . Commands mkdocs new [dir-name] - Create a new project. mkdocs serve - Start the live-reloading docs server. mkdocs build - Build the documentation site. mkdocs -h - Print help message and exit. Project layout mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files.","title":"Home"},{"location":"#welcome-to-mkdocs","text":"For full documentation visit mkdocs.org .","title":"Welcome to MkDocs"},{"location":"#commands","text":"mkdocs new [dir-name] - Create a new project. mkdocs serve - Start the live-reloading docs server. mkdocs build - Build the documentation site. mkdocs -h - Print help message and exit.","title":"Commands"},{"location":"#project-layout","text":"mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files.","title":"Project layout"},{"location":"test/","text":"Test to trigger the pipeline","title":"Test to trigger the pipeline"},{"location":"test/#test-to-trigger-the-pipeline","text":"","title":"Test to trigger the pipeline"}]}
\ No newline at end of file
+{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Documenta\u00e7\u00e3o do projeto Este projeto \u00e9 um exemplo de um sistema de Ecommerce focado para ser generalista e atender a maioria dos casos de uso comuns em sistemas de lojas virtuais. O intuito \u00e9 gerar insights valiosos por meio da visualiza\u00e7\u00e3o de dados, utilizando de t\u00e9cnicas de pipelines de dados para a ingest\u00e3o, transforma\u00e7\u00e3o e visualiza\u00e7\u00e3o de dados. Visite as abas ao lado para mais informa\u00e7\u00f5es sobre o projeto.","title":"Home"},{"location":"#documentacao-do-projeto","text":"Este projeto \u00e9 um exemplo de um sistema de Ecommerce focado para ser generalista e atender a maioria dos casos de uso comuns em sistemas de lojas virtuais. O intuito \u00e9 gerar insights valiosos por meio da visualiza\u00e7\u00e3o de dados, utilizando de t\u00e9cnicas de pipelines de dados para a ingest\u00e3o, transforma\u00e7\u00e3o e visualiza\u00e7\u00e3o de dados. Visite as abas ao lado para mais informa\u00e7\u00f5es sobre o projeto.","title":"Documenta\u00e7\u00e3o do projeto"},{"location":"arquitetura/","text":"","title":"Arquitetura"},{"location":"padroes/","text":"Padr\u00f5es do projeto Documenta\u00e7\u00e3o Focamos em criar uma documenta\u00e7\u00e3o concisa, utilizando os melhores padr\u00f5es de escrita e organiza\u00e7\u00e3o de documentos. Para isso, utilizamos o Markdown, que \u00e9 uma linguagem de marca\u00e7\u00e3o leve e f\u00e1cil de usar, respons\u00e1vel tanto pelas documenta\u00e7\u00f5es que voc\u00ea est\u00e1 lendo e as que est\u00e3o dispon\u00edveis no reposit\u00f3rio. Os arquivos recomendados para a documenta\u00e7\u00e3o s\u00e3o: README.md - Documenta\u00e7\u00e3o principal do projeto CHANGELOG.md - Registro de todas as altera\u00e7\u00f5es feitas no projeto CONTRIBUTING.md - Guia de contribui\u00e7\u00e3o para o projeto CODE_OF_CONDUCT.md - C\u00f3digo de conduta para os colaboradores COLABORATORS.md - Lista de todos os colaboradores do projeto SECURITY.md - Informa\u00e7\u00f5es sobre como denunciar vulnerabilidades de seguran\u00e7a do projeto LICENSE - Licen\u00e7a do projeto Al\u00e9m disso, nos atentamos em criar padr\u00f5es para Issues e Pull Requests, para que a comunica\u00e7\u00e3o entre os colaboradores seja eficiente e clara. Os templates podem ser encontrados dentro de .github . Pull Request Bug Issue Feature Request Issue PULL_REQUEST_TEMPLATE.md bug-report.yml feature-request.yml Changelog Tentamos criar uma pipeline (localizada em .github/release.yml ) para automatizar a cria\u00e7\u00e3o de releases e a atualiza\u00e7\u00e3o do CHANGELOG.md . A ideia \u00e9 que a cada nova vers\u00e3o, o arquivo seja atualizado com as novas funcionalidades, corre\u00e7\u00f5es e melhorias feitas. Por\u00e9m n\u00e3o conseguimos criar uma release a tempo para testar o funcionamento. Deploy Para o deploy do MKDocs, utilizamos o GitHub Pages. A pipeline deploy-mkdocs.yml dentro de .github/workflows \u00e9 respons\u00e1vel por fazer o deploy autom\u00e1tico do site a cada nova altera\u00e7\u00e3o feita na branch main e verificando somente arquivos em que h\u00e1 altera\u00e7\u00f5es que geram uma nova vers\u00e3o do MKDocs. A ideia \u00e9 que o site seja atualizado automaticamente, sem a necessidade de interven\u00e7\u00e3o humana.","title":"Padr\u00f5es do Projeto"},{"location":"padroes/#padroes-do-projeto","text":"","title":"Padr\u00f5es do projeto"},{"location":"padroes/#documentacao","text":"Focamos em criar uma documenta\u00e7\u00e3o concisa, utilizando os melhores padr\u00f5es de escrita e organiza\u00e7\u00e3o de documentos. Para isso, utilizamos o Markdown, que \u00e9 uma linguagem de marca\u00e7\u00e3o leve e f\u00e1cil de usar, respons\u00e1vel tanto pelas documenta\u00e7\u00f5es que voc\u00ea est\u00e1 lendo e as que est\u00e3o dispon\u00edveis no reposit\u00f3rio. Os arquivos recomendados para a documenta\u00e7\u00e3o s\u00e3o: README.md - Documenta\u00e7\u00e3o principal do projeto CHANGELOG.md - Registro de todas as altera\u00e7\u00f5es feitas no projeto CONTRIBUTING.md - Guia de contribui\u00e7\u00e3o para o projeto CODE_OF_CONDUCT.md - C\u00f3digo de conduta para os colaboradores COLABORATORS.md - Lista de todos os colaboradores do projeto SECURITY.md - Informa\u00e7\u00f5es sobre como denunciar vulnerabilidades de seguran\u00e7a do projeto LICENSE - Licen\u00e7a do projeto Al\u00e9m disso, nos atentamos em criar padr\u00f5es para Issues e Pull Requests, para que a comunica\u00e7\u00e3o entre os colaboradores seja eficiente e clara. Os templates podem ser encontrados dentro de .github . Pull Request Bug Issue Feature Request Issue PULL_REQUEST_TEMPLATE.md bug-report.yml feature-request.yml","title":"Documenta\u00e7\u00e3o"},{"location":"padroes/#changelog","text":"Tentamos criar uma pipeline (localizada em .github/release.yml ) para automatizar a cria\u00e7\u00e3o de releases e a atualiza\u00e7\u00e3o do CHANGELOG.md . A ideia \u00e9 que a cada nova vers\u00e3o, o arquivo seja atualizado com as novas funcionalidades, corre\u00e7\u00f5es e melhorias feitas. Por\u00e9m n\u00e3o conseguimos criar uma release a tempo para testar o funcionamento.","title":"Changelog"},{"location":"padroes/#deploy","text":"Para o deploy do MKDocs, utilizamos o GitHub Pages. A pipeline deploy-mkdocs.yml dentro de .github/workflows \u00e9 respons\u00e1vel por fazer o deploy autom\u00e1tico do site a cada nova altera\u00e7\u00e3o feita na branch main e verificando somente arquivos em que h\u00e1 altera\u00e7\u00f5es que geram uma nova vers\u00e3o do MKDocs. A ideia \u00e9 que o site seja atualizado automaticamente, sem a necessidade de interven\u00e7\u00e3o humana.","title":"Deploy"}]}
\ No newline at end of file
diff --git a/test/index.html b/test/index.html
deleted file mode 100644
index c874fb9..0000000
--- a/test/index.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-Test to trigger the pipeline - Eccomerce-ED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Test to trigger the pipeline
-
-
-
-
-
-
-
-
results matching " "
-
-
-
-
-
-
No results matching " "
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file